Spot the bug: coding interview edition

Each puzzle is a short Python solution to a classic interview problem with one real bug: an off-by-one, a wrong base case, a pointer that moves the wrong way. Tap the line you think is wrong (two tries), read why, then fix it and run the tests in your browser. The bugs are the ones that pass the obvious example and fail the edge case, which is exactly what interviewers look for.

You found 0 of 12 bugs

Start with puzzle 1

FAQ