whiteboard-coding

Code Golf: Leibniz formula for Pi

I recently posted one of my favourite interview whiteboard coding questions in "What's your more controversial programming opinion", which is to write a function that computes Pi using the Leibniz formula. It can be approached in a number of different ways, and the exit condition takes a bit of thought, so I thought it might make an in...

Any great books of algorithm puzzles to practice whiteboard coding with?

I'm looking to get some practice coding solutions to algorithm puzzles on a whiteboard. A friend is going to read puzzles to me (as if he were interviewing me), and I'll solve them on a whiteboard. Does anyone know any great books with algorithm puzzles that would be useful for this? I found a book called Puzzles for Programmers and Pro...