Existing codebase Expert · 90 minutes
Expert. Longer and harder than most real rounds: a bigger codebase, a change request partway through, a speed limit and hidden tests. Expect not to finish the first time, and if you haven't done a hard problem yet, start with one of those.
A small working app and a few tickets: fix a bug, add a feature, make something faster.
Crumb & Co. has grown: a central kitchen now bakes for its two shops and for cafés and hotels around town. Every evening the kitchen office runs the production planner over the next few days' orders. It's a Python package of twelve modules (about 900 lines, and 1,500 with its tests): units, the recipe book, the kitchen calendar, versioned orders, the plan itself, the store room, costing, the printed sheets and a command line. It reads its data from CSV files.
Three tickets are waiting for you. Partway through, the kitchen manager comes back with a change request, and every part of the work has hidden tests, like the ones an interviewer runs after you say you're done.
Time box: 90 minutes. This is an expert problem: longer and harder than most real rounds. Do the stages in order, with the change request after stage 2.
allocate to the rules
in the README. Done when every pick and shortage follows those rules, and the stock you're given is
left as it was.
Change request, after stage 2: opened containers. After a visit from the food safety inspector, opened containers have to be used first, and some ingredients only keep for a few days once they're opened. Done when your stage 2 code follows the new rules as well as the old ones. Do it before stage 3: in a real round, this is the interviewer changing the requirements once your first version works.
The README in the download has the tickets and the planner's rules, and there's a changelog.
test_existing.py passes from the start, each test_stageN.py passes when that
stage is done, and test_change_request.py when the change request is. Run them with
python3 -m unittest discover -s tests.
Same format as Meta's AI-enabled coding round and Google's code comprehension round (pilot).
90 minutes, with the AI assistant on, and every stage open from the start. Good for learning the problem. Pick a company to practice with the time limit and AI rules of its real round.
Like a real round: each stage's instructions and tests show up only when the stage before it passes, so you can't read ahead, and neither can the assistant. 90 minutes. Your work here is kept separate from Standard.
Meta says you're expected to use the built-in assistant. Outside AI tools aren't allowed. Some candidates say the assistant could read the files but not edit them, so ours starts in Ask mode. The stages unlock one at a time, as in Interview mode. Our guide to AI-assisted interviews
Google confirmed Gemini is the assistant in the pilot. The stages unlock one at a time, as in Interview mode. Our guide to AI-assisted interviews
Run All tests to see which stages pass. The details for each stage are in README.md and the docstrings.
Reading code you didn't write, changing it without breaking it, and checking what your AI assistant gives you.
Loading the editor…
Choose All tests under the editor and click Run to see where you stand. On the starter repo, the existing tests pass and each stage's tests fail until you finish that stage.
Ask about the code, a failing test, or what to try next, the way you'd use an AI assistant in the interview. Your files and your last run go with every question, so there's nothing to paste.
In Edit mode it also changes your files when you ask it to, and you can undo each change. Some interviews' assistants can edit your code and some can only answer, so switch to Ask to practice the second kind.
It can often write a whole stage at once. In an interview you'd have to explain every line, so practice in small steps. Why, and how to talk about AI-written code
Answers come from Claude Sonnet and can be wrong. Run the tests before you trust one.
It's free with an Interview Cake login while the workspace is in beta, up to 30 questions a day.
Prefer your own editor? Download the starter repo, or use Download my code to take your work with you, and run the tests with python3 -m unittest discover -s tests.
The task, the rubric and the walkthrough are on the problem page.