Problem Patterns
Structured AI-enabled rounds reuse one shape. You get a small working codebase, and the work arrives in three escalating pieces: fix a bug, then implement the core feature, then make it survive a bigger input. Hello Interview describes this as the typical arc across the companies running the format, and candidate reports from Meta, LinkedIn and Uber all match it.
Knowing the arc is worth more than it sounds. It tells you how much time each piece deserves, it tells you that the codebase you are reading in minute two is the one you will be optimising in minute fifty, and it stops you from polishing phase one while the part that actually carries the scorecard is still ahead of you.
Phase 1: the bug, which is usually not algorithmic
Candidates prepare for this phase as though it were a debugging puzzle. It is closer to a reading comprehension test.
The planted defects are mundane. The ones that show up repeatedly are type-casting mistakes — an int cast to a double where the rest of the system expects an int, so the arithmetic quietly stops being exact — along with off-by-one errors in loop bounds and conditionals that are subtly inverted or tautological. None of it requires an algorithm. All of it requires actually reading the line in front of you rather than the line you assume is there.
The giveaway is that the symptom usually points somewhere other than the cause. In one Meta interview the code carried a safety check that capped iterations at 10,000 and threw when it hit the cap, so the visible failure looked like a limit problem; the real fix was adding a visited set so the traversal stopped looping forever in the first place. Raising the cap would have made the error message go away and left the bug in place. That pattern — a guard reporting a problem it did not cause — is extremely common, and it is why “fix the error message” is almost never the right move.
Phase 1 often comes with questions attached. Expect to be asked what the existing unit tests actually assert, and to give the complexity of the implementation as it stands. Both are cheap to answer if you read the tests first, and both are embarrassing if you did not.
The AI policy here varies by interviewer. Some say explicitly that this part is unassisted; others leave it to you. If it is left open, consider debugging phase 1 without the assistant. Several candidates who did reported that it bought them credibility immediately, and one E5 said it demonstrated they could still solve problems independently — a question every interviewer in this format has in the back of their mind. The cost is low, too: a planted bug in 200 lines is usually findable in five minutes by reading, and explaining the bug to a model takes about as long as finding it yourself.
Phase 2: the main event
This is where the round is won, and where AI use is expected rather than merely permitted.
Phase 2 asks you to add a feature on top of the now-working codebase. Candidates consistently describe it as harder than a medium LeetCode problem, and the finished implementation tends to land around 120 lines or more. That volume is deliberate. These problems were designed on the assumption that you have an assistant, which means the bar for what you are expected to produce in the hour is higher than in a traditional round, not lower. An hour of unassisted typing would not get you there.
Reported examples give a sense of the flavour. One is BFS maze navigation where the grid carries directional gates, so a cell is traversable in some directions and not others and the standard neighbour expansion no longer works unmodified. Another is maximising the number of unique characters obtainable across a set of words. Both are recognisable algorithm problems wearing a feature request: the algorithm is not exotic, but the constraint attached to it means you cannot paste a textbook implementation and move on.
That is the real test. The model will happily produce a clean, correct, textbook BFS. Integrating it with the gate rules, the existing data structures and the existing test harness is the part you own.
Phase 3: the input that breaks what you just built
Phase 3 hands you a larger input and tells you your phase-2 solution no longer works.
The common mistake is to hear this as “make it faster” and reach for micro-optimisation. Often it is not a speed problem at all but an approach problem: the fix is switching algorithms outright. Greedy to a trie. DFS to a bitmask over states. A linear scan to a heap. If you find yourself shaving constants, you have probably misread the phase.
The harder part is that the catch is frequently hidden in the characteristics of the test data rather than in the algorithm. The new input is not simply bigger; it is differently shaped. Durations span millions of ticks while the number of items stays small. Keys cluster so that one bucket holds most of the data. Items arrive sorted, or almost sorted. Read the generator or the input spec before you theorise, because the shape of the data is usually what tells you which part of your solution is now quadratic.
You can also put the model to work here in a way interviewers reportedly like: ask it to benchmark two candidate approaches against different input profiles and tell you where each one falls over. That is a genuinely good use of an assistant — it is tedious, mechanical work that you would otherwise do by hand — and it makes your eventual choice evidence-backed rather than asserted.
Not finishing is fine
Worth stating plainly, because it changes how you should pace yourself: multiple candidates who did not complete phase 3 still received offers. One said outright that they ran out of time on the optimisation and still cleared the onsite.
The scorecard rewards approach and reasoning over completion. A clearly articulated plan for phase 3, with the right diagnosis of why the current solution breaks and a named alternative, scores on problem solving even with no code attached. A silent, unfinished attempt scores on nothing. Say the plan out loud — Talking While You Work covers the mechanics.
The time budget
Sixty minutes, in practice, breaks down something like this:
- 5-6 minutes orienting in the codebase. Entry point, core module, tests.
- 8-10 minutes on phase 1.
- The remaining 30-40 minutes split between implementation and optimisation.
The failure mode is spending fifteen minutes perfecting phase 1 — refactoring around the bug, adding tests nobody asked for, chasing a second defect that was never planted. Fix it, confirm the tests pass, say so, and move. Phase 1 is a warm-up that carries a fraction of the weight of phase 2.
The six sandbox problems, mapped
Each problem in the sandbox ships all three phases against the same codebase, which is the point: the file you debug is the file you extend and then the file you optimise.
| Problem | Pattern it exercises | Where the phase-3 catch hides |
|---|---|---|
| Inventory Packer | Greedy first-fit under a capacity invariant; the bug is a conditional that is always true | First-fit over a growing list of open boxes is quadratic at 50,000 items — needs a different structure, not a faster loop |
| Spell Checker | Edit-distance scoring; phase 2 changes the cost model rather than the algorithm | A work budget rather than a clock, so the answer is pruning and early exit, not a new algorithm |
| Maze Solver | BFS on a grid, then directional gates — the reported Meta shape almost exactly | Grid size grows, so per-cell state and the visited representation start to matter |
| Task Scheduler | Topological ordering; the bug rejects a graph it should accept | Tie-breaking by priority at scale pushes you from repeated scanning to a heap |
| Route Planner | Weighted shortest path; phase 2 adds service windows, which turns edges time-dependent | State has to be augmented, so the naive relaxation both over-counts and blows up |
| Kitchen Orders | Event scheduling with a head-of-line queue; the bug is a wrong tie-break in the sort key | The data, not the algorithm: durations span millions of ticks, so a tick-by-tick clock is hopeless while the item count stays small |
Kitchen Orders is the cleanest illustration of the data-shape point. Nothing about the scheduler is the wrong algorithm; the clock simply advances one tick at a time across a service that runs for millions of ticks. You find that by reading the generator, not by profiling.
A variant: approve this pull request
Not every structured round is build-and-optimise. Some companies hand you a pull request instead — a description and a diff — and ask you to work through it with the assistant and say whether you would approve it.
Same skills, different shape. You are still reading code you did not write, still forming a hypothesis about intent before judging the implementation, still verifying rather than trusting. If anything it strips the format down to its core, because there is no implementation work to hide behind. Verification applies unchanged.
In the interview room
The phases are not three separate problems, and the single biggest tactical gain available to you is treating them as one. The codebase you read in minute two is the codebase you optimise in minute fifty, so the reading you do up front pays three times. Specifically: note where the hot loop is while you are hunting the phase-1 bug, because that is almost certainly what phase 3 will attack.
What follows is the per-phase playbook — what to prompt, what to say, and the handoffs between phases, where most of the lost time actually goes.
Phase 1, without the assistant if you can
Open the tests first. They tell you the contract, the expected output format, and usually the phase boundaries. Then read the module the failing test touches, top to bottom, before forming a hypothesis.
State the hypothesis out loud before you test it, and name the class of bug you suspect: “the output is one too high, so I’d look at a boundary before I look at the arithmetic.” Then check the conditionals specifically. A tautological guard — a comparison that cannot be false, like subtracting a quantity and adding it straight back before the test — is the single most common planted defect in these codebases, and it is invisible unless you evaluate the expression rather than skim it.
If you want the assistant here, use it to narrow, not to find: “list every place in this file where an integer is converted to a float” is a good prompt. “Find the bug” is not, and it tends to produce a confident wrong answer that costs you five minutes to disprove.
Announce the fix and the passing tests, then explicitly close the phase: “that’s phase one, moving to the feature.” Interviewers rarely interrupt a candidate who is still fiddling, so the handoff is yours to make.
Phase 2, where the prompt granularity decides the outcome
Do not prompt for the feature. Prompt for the pieces, in the order you decided during planning. One prompt per unit you can verify — see Prompt Granularity for where that line sits.
The high-value move in phase 2 is giving the model the constraint in the same breath as the task, because the constraint is the whole problem. “Write a BFS over this grid” gets you a textbook traversal you then have to retrofit. “Write a BFS over this grid where each cell carries a set of allowed exit directions, and a move is only legal if the direction is in the source cell’s set” gets you something you can actually use. The second prompt is longer by one clause and saves five minutes.
Integrate as you go rather than at the end. Paste one piece, run the tests, say the result, prompt for the next. A 120-line feature assembled in six verified steps is recoverable when step four is wrong; the same 120 lines pasted in one go is a debugging session with no bisection points.
When the model produces something you did not ask for — an extra helper, a changed signature, a defensive branch — say so and delete it. Unrequested code is the thing interviewers watch for most closely, because accepting it is the clearest evidence that you are not reading.
Phase 3, diagnose before you optimise
Read the new input spec or generator before you touch the code. Say what the shape is: how many items, over what range, arriving in what order. Then say which part of your solution that shape breaks, and only then propose a fix. Diagnosis before prescription is the whole phase.
Say the complexity out loud, in terms of the new input. “Fifty thousand items against a list of open boxes that grows with the input, so that scan is quadratic — roughly a billion comparisons.” A number makes the problem concrete for the interviewer and it forces you to be honest about whether you have actually found the bottleneck.
Then name the structural change rather than describing it vaguely. “I need to stop scanning every open box, so I want the boxes indexed by remaining capacity” is a plan. “I’ll make the loop more efficient” is not.
If you have time, use the assistant for the comparison: ask it to generate inputs at two different profiles and time both approaches. If you do not have time, say what you would compare and why. Either version reads as engineering judgment; neither requires you to finish.
The handoffs
The three most expensive minutes in the hour are the ones between phases, when you have stopped working on the last thing and have not started the next. Close each phase with a sentence and open the next with a plan. “Tests pass, that’s the bug. For the feature I’m going to do the data model first, then the traversal, then wire it into the existing entry point — three prompts.” Thirty seconds spent there is the best-value time in the round.
And if the clock beats you, spend the last two minutes talking rather than typing. Say what breaks, say what you would change, say what you would verify. A diagnosis with no code still lands on the scorecard. Half an untested refactor does not.