MockDojo

Question bank, AI-assisted, AI-assisted coding

Review the AI's pull request

An AI assistant wrote this LRU cache for our session service. It passes the happy-path test. Review it like a teammate's pull request: what's wrong, how would you prove it, and how would you fix it?

30 minutes, for junior, mid-level, senior engineers

How the interview runs

  1. 1.Read it. Before judging it: walk me through what this code does and what it assumes.
  2. 2.Find the bugs. What's wrong with it? Be specific about the input that breaks it.
  3. 3.Prove it. How would you prove the bug with a test, before touching the code?
  4. 4.Fix it. Fix it in the editor and tell me why the fix is correct.
  5. 5.Working with AI. If you were prompting the assistant again, what would you change so it gets this right, and what would you still check by hand?

What you're graded on

  • Explained the code before judging it15 pts
  • Found the real bugs30 pts
  • Proved it with a failing test20 pts
  • Correct fix20 pts
  • Directed and verified the AI15 pts

Practice this one for real

Answer it phase by phase, then get the rubric score, what you missed and the model answer outline.

Unlock with Lifetime