Skip to content
spot_the_ai_bug

Find-the-bug coding interview questions

Debugging and code-review rounds are now a standard part of technical interviews, and with AI writing more code, reading it critically matters more than ever. Here are 30 short, realistic snippets, each with exactly one real bug, a clear explanation and a production-ready fix.

Interview questions by language

Interview questions by bug type

How to answer a spot-the-bug interview question

  1. Say what the code is supposed to do, in one sentence.
  2. Walk through it with a normal input, then with edge inputs: empty, zero, null, very large, concurrent calls.
  3. Point to the exact line and explain what breaks, for whom, and when.
  4. Propose the smallest correct fix, then mention how you'd test it.
  5. Offer a follow-up: how to prevent the whole class of bug (types, linters, tests, code review checklists).

FAQ

What is a find-the-bug coding interview question?

You get a short, realistic piece of code that contains a bug and you're asked to find it, explain what breaks and propose a fix. It tests code-reading, debugging and code-review skills rather than algorithm memorization.

Which companies ask debugging or code review questions?

Many teams now include a code-review or debugging round, especially for backend, full-stack and senior roles, because reviewing AI-generated and teammates' code is a large part of the job.

How should I answer a spot-the-bug question?

Read the code top to bottom, state what it's supposed to do, test it mentally with normal and edge inputs (empty, zero, null, concurrent calls), point to the exact line, explain the failure and give a minimal fix.

How can I practice debugging every day?

Play Spot the AI Bug: every day there's a new AI-written pull request with one real bug. Find the line in three attempts, name the bug type and compare your streak with friends.

Are these questions free?

Yes. All interview questions on this site and the daily puzzle are free to play.

Every day, everyone gets the same pull request written by AI. It looks clean. It has comments. It has exactly one real bug.

  1. 1

    Find the line

    Tap the buggy line, then hit Submit. You get 3 attempts.

  2. 2

    Read the hints

    A miss within 2 lines is 🔥 Warm. Anything further is ❄️ Cold.

  3. 3

    Name the bug

    Found it? Bonus round: pick the bug type from 4 options. It doesn't affect your win, just your bragging rights.

// your share card

found in 3/3

🟥 cold miss · 🟨 warm miss · 🟩 found · ⬛ unused

Keyboard: ↑ ↓ to move between lines, Enter to submit. A new bug drops every day at midnight IST.

0
Played
0
Win %
0
Streak
0
Max

Attempts distribution