Hacker News new | ask | show | jobs
by p0nce 3723 days ago
Fizzbuzz trick: you have to make a special case for modulo 15, you can't reuse the 3 and 5 cases.

string reversing in place trick: stopping at the middle else it's an identity function.

Any time you spend with Fizzbuzz, you could spend it on more complete quizzes, discussing past experiences, taking references etc.

1 comments

And if the candidate trips up, this gives you an opportunity to walk through a virtual compile-debug-test cycle.

When I asked these kinds of questions I would execute the program in my head, and tell the candidate things like "your reverse() methods moves some stuff around, but the end result appears the same as before". Or "this fails with ArrayIndexOutOfBounds on line X". Typically it only took a few minutes to find the bug and fix it, and I learned about how the candidate solves problems.