DEV Community

Cover image for IBM Coding Assessment Guide 2026: Questions, Timing, and Preparation
PracHub
PracHub

Posted on Originally published at prachub.com

IBM Coding Assessment Guide 2026: Questions, Timing, and Preparation

Most candidates prepare for “the IBM coding test” as if every applicant receives the same questions, timer, and platform. IBM’s own guidance says the format depends on the role. The invitation email is your test specification.

This guide combines that official baseline with four real IBM coding questions from the PracHub question bank. The questions cover intervals, string indexing, character-frequency reasoning, and sliding windows. They are useful because they show the range an IBM assessment can span: one problem may be a five-line accuracy check, while the next requires a full medium-level algorithm.

Before starting a generic problem list, open PracHub’s IBM Coding & Algorithms questions. Use the reported questions below to identify the patterns you actually need to repair.

Candidate working through IBM coding assessment patterns including intervals and sliding windows

Prepare for the role-specific assessment in your invitation, then use real IBM question reports to make the practice concrete.

Quick verdict: IBM publicly confirms that an assessment may contain multiple-choice questions, coding challenges, or both. It does not publish one universal question count, duration, platform, language list, or passing score. Read the invitation first, then train timed coding fundamentals and the role-specific material named in the job description.

What IBM officially confirms

IBM’s application process describes coding assessments as multiple-choice questions or coding challenges, depending on the role. Its assessment FAQ tells invited candidates to complete the assessment within seven days and to check whether their specific assessment is timed.

  • Detail: Format; What you can rely on: MCQs, coding challenges, or a role-dependent combination; What you must verify: The sections listed in your invitation
  • Detail: Completion window; What you can rely on: IBM asks invited candidates to finish within seven days; What you must verify: The exact deadline and time zone in your email
  • Detail: Timer; What you can rely on: Some assessments are timed; What you must verify: Total time and whether sections use separate timers
  • Detail: Question count; What you can rely on: IBM publishes no universal number; What you must verify: The assessment landing page before starting
  • Detail: Programming languages; What you can rely on: Availability depends on the role and environment; What you must verify: The language selector and job requirements
  • Detail: Proctoring; What you can rely on: IBM may store code and webcam photos in some coding exercises; What you must verify: The permissions and notices shown for your assessment
  • Detail: Passing score; What you can rely on: IBM publishes no universal cutoff; What you must verify: Recruiter guidance, if the team shares it

IBM coding assessment details that are confirmed versus invitation specific

Use IBM’s public guidance for the baseline and your invitation for every assessment-specific rule.

Does IBM use HackerRank?

Candidate reports often describe HackerRank-hosted IBM assessments, and IBM’s entry-level developer guidance includes HackerRank among suggested practice resources. IBM’s public application page does not promise one platform for every role or region.

Prepare the skills that transfer across platforms: read a function signature, handle standard input, write compilable code, create your own tests, and interpret failure messages. Then use the tutorial or practice environment linked in your invitation.

What topics should you prepare?

The job description is the best predictor of the second lane of preparation. IBM’s developer guidance says technical topics may include data structures, networking, technology, and data handling. The balance changes across software engineering, data, AI, and infrastructure roles.

  • Role family: Software engineering; High-value practice: Arrays, strings, hashing, sorting, intervals, trees, graphs; What a strong submission demonstrates: Correctness, complexity, edge cases, readable implementation
  • Role family: Data engineering; High-value practice: SQL, joins, aggregation, data transformation, basic algorithms; What a strong submission demonstrates: Data semantics, null handling, scale, deterministic output
  • Role family: Data science and AI; High-value practice: Python, SQL, arrays, statistics, data manipulation; What a strong submission demonstrates: Shape reasoning, assumptions, numerical and data edge cases
  • Role family: Cloud and infrastructure; High-value practice: Core coding plus networking, Linux, APIs, or automation; What a strong submission demonstrates: Operational reasoning and failure-aware code

A candidate discussion may mention two coding questions, but that is one report, not a universal template. The question-bank evidence below is more useful as a pattern map than as a prediction of your exact test.

Four real IBM coding questions from the PracHub bank

PracHub currently has no visible IBM record whose normalized round field is literally “Online Assessment.” The four records below are stored under Technical Screen, but the candidate source reports behind them explicitly describe the exercise as an OA. We show that distinction instead of silently relabeling the bank or implying that every IBM assessment reuses the same prompts.

  • Real question: Compute minimum rooms for meeting schedule; Reported task: Given unsorted half-open meeting intervals, return the minimum rooms required; Pattern to know: Sorting, two pointers or a min-heap, tie semantics; Why it is useful OA practice: Tests whether you turn a story into events and handle an end time equal to a start time
  • Real question: Reverse last two characters with space; Reported task: For a string such as "bat", return "t a"; Pattern to know: Direct indexing, output formatting, minimum-length assumptions; Why it is useful OA practice: A short correctness check where overengineering and off-by-one errors are the main risks
  • Real question: Maximize palindromic strings after character swaps; Reported task: Swap characters between strings and maximize how many strings can become palindromes; Pattern to know: Global frequency counts, pair budgets, greedy allocation; Why it is useful OA practice: The operation sounds local, but the key simplification is that characters form one shared pool while string lengths stay fixed
  • Real question: Find minimum subarray length with k distinct integers; Reported task: Return the shortest contiguous subarray containing exactly k distinct values; Pattern to know: Sliding window, frequency map, careful shrinking; Why it is useful OA practice: Distinguishes “exactly k” from the easier “at most k” pattern and exposes stale-count bugs


IBM question-bank pattern ladder

<rect width="1000" height="430" rx="28" fill="#071a36"></rect>


<line x1="126" y1="244" x2="874" y2="244" stroke="#365b8c" stroke-width="8" stroke-linecap="round"></line>
<g>
  <circle cx="145" cy="244" r="50" fill="#14b8a6"></circle>




  <circle cx="382" cy="244" r="50" fill="#38bdf8"></circle>




  <circle cx="619" cy="244" r="50" fill="#f4b942"></circle>




  <circle cx="856" cy="244" r="50" fill="#818cf8"></circle>




</g>
Enter fullscreen mode Exit fullscreen mode


Do not sort only by nominal difficulty. These four problems exercise different failure modes under a timer.

Question 1: minimum rooms for a meeting schedule

The IBM meeting-room question gives a list of [start, end] intervals and asks for the minimum number of rooms. The intervals are unsorted. If one meeting ends at time t and another starts at t, they can share a room.

The two standard solutions are both appropriate:

  • Sort the starts and ends separately, then sweep them with two pointers.
  • Sort meetings by start time and keep active end times in a min-heap.

The critical line in the two-pointer version uses starts[i] < ends[j], not <=. An end at time t frees its room before a start at time t consumes one. Sorting dominates the runtime, so the target is O(n log n) time.

  • Test: []; Expected rooms: 0; What it checks: Empty input contract
  • Test: [[1, 4]]; Expected rooms: 1; What it checks: Single interval
  • Test: [[1, 2], [2, 3]]; Expected rooms: 1; What it checks: Touching half-open intervals
  • Test: [[1, 4], [2, 5], [3, 6]]; Expected rooms: 3; What it checks: Peak overlap
  • Test: [[5, 7], [1, 10], [2, 3]]; Expected rooms: 2; What it checks: Unsorted input

Question 2: reverse the last two characters

The IBM string question is intentionally small: given "bat", output "t a". The useful preparation lesson is not the algorithm. It is discipline. Confirm that the string has at least two characters, use direct indexing, and match the output exactly. A hidden test can reject "ta", "t a", or reversed indexing just as decisively as it rejects a broken graph algorithm.

Question 3: maximize palindromic strings after swaps

The palindrome question lets you swap one character from one string with a character from another, any number of times. Each string keeps its original length.

The conceptual jump is to stop simulating swaps. Unlimited cross-string swaps mean the characters form a global inventory. A palindrome of length L needs floor(L / 2) character pairs, plus one arbitrary center character when L is odd. Count all character frequencies, convert them into a total pair budget, and allocate that budget to strings with the smallest pair requirements first. The interviewer is testing whether you can replace a noisy operation with the invariant it creates.

Before coding, ask whether empty strings are allowed and whether only lowercase English letters can appear. Those details determine the frequency structure, even though they do not change the core reasoning.

Question 4: shortest subarray with exactly k distinct values

The exactly-k question asks for the minimum length of a contiguous subarray with exactly k distinct integers, or -1 when no such window exists.

Use a sliding window and a frequency map. When the window has more than k distinct values, advance the left boundary until it becomes valid again. When it has exactly k, remove duplicate copies from the left while the leftmost value would still remain in the window. Only then measure the length. This “shrink without losing a distinct value” rule is what turns a valid window into the shortest valid window ending at the current right boundary.

Test k = 0, an empty array, all-equal values, k larger than the total distinct count, negative integers, and a window where the leftmost value appears several times. The intended complexity is O(n) time because each pointer moves forward at most n times.

Timing, hidden tests, and submission strategy

IBM does not publish one global duration, so a fixed “30 minutes per problem” rule can fail. Use percentages that adapt to the timer shown in your invitation.

  • Share of time: First 5%; Action: Scan every section and constraint; Concrete output: Question order and risk map
  • Share of time: Next 15%; Action: Write examples, choose an approach, estimate complexity; Concrete output: A plan you can defend
  • Share of time: Next 60%; Action: Implement the simplest correct solution; Concrete output: Runnable code for the full contract
  • Share of time: Next 15%; Action: Attack edge cases and likely hidden tests; Concrete output: Evidence beyond the samples
  • Share of time: Final 5%; Action: Re-read constraints and submit deliberately; Concrete output: Clean final answer

If there are multiple questions, scan them first. The four real examples show why. A short string problem should not consume the same planning time as the palindrome or sliding-window problem. Secure the clean result, then spend the remaining time where reasoning matters.

What hidden tests usually expose

Hidden tests are usually ordinary consequences of the written contract that the sample did not exercise.

  • Failure pattern: Boundary mistake; Test before submitting: Empty input, one item, minimum permitted size; IBM-bank example: Reverse-two-characters needs a clear minimum length
  • Failure pattern: Tie semantics; Test before submitting: Equal timestamps, duplicates, touching intervals; IBM-bank example: Meeting end at t versus meeting start at t
  • Failure pattern: Incorrect state; Test before submitting: Repeated calls, stale globals, mutated input; IBM-bank example: Frequency maps must represent only the current window
  • Failure pattern: Numeric or count error; Test before submitting: Zero, negative values, odd totals, overflow; IBM-bank example: Palindrome centers and unused characters
  • Failure pattern: Complexity failure; Test before submitting: A synthetic input near the maximum constraint; IBM-bank example: Sliding window should not restart for each index
  • Failure pattern: Output mismatch; Test before submitting: Exact return type, ordering, whitespace, casing; IBM-bank example: "t a" is not "ta"

Do not stop when the sample passes. State the invariant your algorithm preserves, derive the time and space complexity, and write at least three adversarial tests.

For additional timed practice, stay within IBM Coding & Algorithms questions until the patterns above feel automatic. Then broaden to the Software Engineer question bank for later technical rounds.

A seven-day IBM assessment plan

Seven day IBM coding assessment preparation workflow

Turn the seven-day completion window into a diagnostic, repair, and simulation cycle.

  • Day: 1; Focus: Read the invitation and job description; Concrete deliverable: Platform, timer, sections, languages, deadline, role skill map
  • Day: 2; Focus: Run a timed diagnostic; Concrete deliverable: Solve the IBM string and interval questions; start an error log
  • Day: 3; Focus: Repair stateful patterns; Concrete deliverable: Solve the exactly-k sliding-window question and two related problems
  • Day: 4; Focus: Practice role-specific material; Concrete deliverable: SQL, data, networking, or cloud work aligned to the job description
  • Day: 5; Focus: Train hidden-test discipline; Concrete deliverable: Apply the edge-case table to two solutions before submitting
  • Day: 6; Focus: Simulate the full assessment; Concrete deliverable: One uninterrupted session in your chosen language
  • Day: 7; Focus: Review lightly and complete; Concrete deliverable: Stable environment, rested attempt, deliberate submission

Record mistakes by cause, not by problem name. “Forgot to release an interval on a tie” and “measured the window before shrinking duplicates” are reusable lessons. “Got problem 3 wrong” is not.

Day-of rules, proctoring, and privacy

IBM’s applicant privacy notice says it may record and store code created during coding assessments and may store one or more webcam photos during coding exercises. Video-enabled assessments may also produce recordings. That wording describes possible collection; it does not prove that every IBM coding assessment continuously records video.

Read the consent screen and invitation before you begin. Check camera permissions, close unrelated applications, keep identification available if requested, and contact the assessment support channel before the deadline if you need an accommodation.

IBM’s application guidance also draws an AI boundary: using AI to learn concepts is encouraged, but using it to rewrite technical solutions for an assessment is not allowed. Prepare with AI beforehand if useful. During the assessment, follow the displayed rules and submit your own work.

  • Before opening the timer: Confirm the deadline and time zone; Before final submission: Re-read every constraint
  • Before opening the timer: Test browser, network, camera, and keyboard; Before final submission: Run boundary, tie, and scale tests
  • Before opening the timer: Choose an allowed language you know deeply; Before final submission: Remove debug output and dead code
  • Before opening the timer: Reserve enough uninterrupted time for one sitting; Before final submission: Check return type and output format
  • Before opening the timer: Open only resources the rules permit; Before final submission: Submit before the timer expires

IBM coding assessment FAQ

How many questions are on the IBM coding assessment?

IBM does not publish one universal question count. Candidate reports vary by role and location. The PracHub bank includes IBM reports with pairs of coding questions, but that does not guarantee your assessment will contain two. Check the invitation and pre-assessment screen for your exact structure.

How long is the IBM coding assessment?

The timer varies by assessment. IBM’s public FAQ tells candidates to check whether their assessment is timed and to reserve enough uninterrupted time to finish in one sitting. The separate seven-day rule is the completion window after invitation, not necessarily the duration of the test itself.

Are the four questions above guaranteed to appear?

No. They are real IBM-tagged questions from candidate reports in the PracHub bank, included to show the level and pattern mix that has been reported. Use them as practice evidence, not as a leaked or guaranteed question set.

What difficulty should I expect?

There is no official universal difficulty label. The reported IBM examples range from direct string indexing to medium interval, greedy, and sliding-window problems. Prepare to finish easy accuracy checks quickly and solve common medium patterns with clean complexity and edge-case reasoning.

Can I choose my programming language?

Language availability depends on the assessment environment and role. IBM’s developer guidance recommends using your strongest language in most cases, but the selector and invitation control. Confirm support before the timer begins and practice the exact input, output, and testing workflow in that language.

Does IBM record the coding assessment?

IBM’s privacy notice says code may be stored and one or more webcam photos may be captured during coding exercises; video-enabled assessments may also be recorded. This is not proof of identical monitoring for every test. Read the permissions and privacy notice presented for your assessment.

Can I retake an IBM coding assessment?

IBM does not publish one retake policy for every assessment. If a technical problem interrupts the session, document it immediately and use the support contact in the invitation. Do not assume that refreshing, reopening, or starting another application creates a valid retake.

The practical next step is simple: solve the four linked IBM questions in one sitting, record which invariant or edge case failed first, and repair that weakness before taking the real assessment.

Sources and further reading

Originally published on PracHub.

Top comments (0)