HackTheRounds Interview Experiences

IBM Software Engineer OA Interview Experience (2026) - K Non-Overlapping Palindromic Substrings DP, Pending

IBM 2026 SWE OA recap: coding K non overlapping palindromic substrings via two stage DP on palindrome table plus segmentation, scheduling constraint reasoning p

By Anonymous ยท 2026-04-17

Background

IBM's OA changed shape for the 2026 cycle in a way that caught me off guard. The classic three-section structure is still there (coding, logical reasoning, situational judgment), but the coding problem I got this round was a non-overlapping-palindrome DP that was firmly in the medium-to-hard band, not the medium band my friends got last year. I am a third-year CS student applying for the Software Engineer track, and I took the OA in early April. This post is the honest recap, including the parts where I thrashed.

Timeline

Total so far: 3 weeks.

OA Format (three sections, ~95 minutes)

The proctored platform is one of the generic third-party vendors IBM rotates across regions. Screen recording on, but no webcam for this particular region.

This question is coming soon to HackTheRounds.

Problem 1: K Non-Overlapping Palindromic Substrings for Maximum Length

Problem: Given a lowercase string s of length up to 200 and an integer k , select k non-overlapping palindromic substrings to maximize the sum of their lengths. Return that maximum sum. Example: s = "abbaeae" , k = 2 . Pick "abba" (length 4) and "aea" (length 2) for a total of 6.

Two-stage DP. First, precompute a boolean table isPalin[i][j] that marks whether the substring s[i..j] is a palindrome. Standard O(n^2) DP by expansion from length 1 up.

Second, run a DP over prefix length and number of segments. Let dp[i][t] be the maximum total palindrome length using the first i characters and selecting at most t non-overlapping palindromes. Transition: for each ending position i and each start position j <= i , if isPalin[j-1][i-1] is true, consider taking that palindrome: dp[i][t] = max(dp[i][t], dp[j-1][t-1] + (i - j + 1)) . Always include the option of not ending a palindrome at i : dp[i][t] = max(dp[i][t], dp[i-1][t]) . Answer is dp[n][k] .

Complexity is O(n^2) for the palindrome table plus O(n^2 k) for the segmentation DP. At n = 200 , that is roughly 40,000 k operations, which is comfortable.

I wrote the palindrome table first and tested it on abbaeae . Then I wrote the segmentation DP. First submission missed the "skip position" transition ( dp[i][t] = max(dp[i][t], dp[i-1][t]) ) and failed two tests where the optimal answer uses fewer than k palindromes. Adding the skip fixed both.

This question is coming soon to HackTheRounds.

This question is coming soon to HackTheRounds.

Logical Reasoning Block

Mostly text-based puzzles this cycle, with one graphic sequence.

Example: Five-employee scheduling puzzle

A company has five employees (A, B, C, D, E), each covering one day Monday through Friday. Constraints:

  • A is not Monday; A's day is two days before C's.
  • B and D are adjacent, with B before D.
  • E is not Friday and not adjacent to A.
  • If C is Wednesday, D is not Friday.

Determine each person's duty day.

This is a constraint-satisfaction puzzle solvable by trying A's day. A can be Tuesday or Wednesday (since A is two days before C, A cannot be Thursday or Friday, and A is not Monday). If A is Tuesday, C is Thursday. B and D are adjacent with B before D, so (B, D) is one of (Monday, Tuesday), (Tuesday, Wednesday), (Wednesday, Thursday), (Thursday, Friday). Tuesday is A and Thursday is C, so (B, D) is (Monday, Tuesday) fails on A, (Tuesday, Wed) fails, (Wed, Thu) fails on C, (Thu, Fri) fails on C. No valid placement, so A is Wednesday and C is Friday. Continuing from there, the unique assignment falls out.

Timing: about 4 minutes per reasoning question. If the constraint network does not simplify in the first minute, move on. The grader favors completion over difficulty-weighting.

Behavioral and Situational Questions

Five prompts this cycle, two-minute soft cap per answer (they were text responses, not video):

  • A time you faced a severe resource shortage (time, people, budget). How did you handle it and what was the result.
  • An experience resolving major disagreements within a team. Strategies and results.
  • A project you led that hit a sudden serious risk. How you identified, evaluated, and mitigated it.
  • A time you had to learn a new skill quickly under pressure. How you learned and the impact.
  • Prioritizing multiple urgent tasks at the same time. Scenario and outcome.

IBM's scoring rubric rewards accountability language: "I identified the risk by X, escalated to Y, and owned the mitigation plan." The rubric punishes blame-shifting language: "the team did not communicate, so I had to fix it."

What tripped me up

My first DP submission on Problem 1 missed the "skip" transition, which meant the DP was forced to use exactly k palindromes even when the optimal answer uses fewer. That is the trap IBM specifically tests. The clean formulation is "at most k ," not "exactly k ."

On the reasoning block, I spent 8 minutes on the scheduling puzzle instead of the 4-minute budget I had set myself. That cost me two questions later in the block. I will hold to the per-question time cap more strictly next time.

Result

Submitted with 4 minutes remaining. Coding passed the visible test cases after the skip-transition fix. Awaiting the next-round call at time of writing.

Tips

  1. For Problem 1, write the transition as "at most k palindromes," not "exactly k." The skip-position option `dp[i][t] = max(dp[i][t], dp[i-1][t])` is the transition that distinguishes a passing solution from one that wrong-answers on partial-`k` cases.
  2. Precompute the palindrome table before the segmentation DP. Computing `isPalin[i][j]` inline inside the outer DP turns O(n^2 * k) into O(n^3 * k) and TLEs at `n = 200`. The separation is mandatory.
  3. Hard-cap reasoning questions at 4 minutes each. IBM's reasoning block scores throughput. If the constraint network does not collapse after one pass, guess and move.
  4. On the scheduling puzzle, fix one variable first. The "A's day" anchor is the one that eliminates the most candidate placements. Starting from a different anchor (like C's day) makes the puzzle look ambiguous when it is not.
  5. For behavioral text responses, structure each answer as "situation, your action, outcome." IBM's text-response rubric is template-matched to the STAR format. Filler paragraphs outside that structure score lower than the raw three-sentence form.
  6. Submit the coding problem even if you are not sure about a transition. IBM's OA gives per-test-case credit. A solution passing 6 of 10 is strictly better than an empty submission, even if you know the edge-case transition is wrong.

The IBM OA gets easier the second time you see one. The first time is hard specifically because the cross-section pacing is unintuitive. Run a full practice pass against a timer at least once before the real thing.