Do you think you could rough out an answer on a whiteboard that would have roughly the right structure?
When I used this question I wasn't looking for accurate syntax. If it was a solution that looked like it would work, after some debugging etc. I'd consider that a pass.
Regardless most people couldn't answer it, which I considered surprising.
Sure, the structure is obvious; one was an issue of a method being named differently than I remembered, the other was an off-by-one error that'd show up in testing.
Assuming these candidates already made it past an initial filter it would be interesting to ask the filtered out applicants the same question and see how well they do