Cracking the coding interview by Gayle Laakmann McDowell
After a very brief introduction to techniques for being successful at interview, this book covers around 150 coding questions in a great deal of detail. These questions range from simple data structure questions on strings and arrays, stack and queues, and trees, through scalability and mathematical puzzlers to language related questions. Full answers are given to each of the questions, often with more than one answer being covered and with an emphasis on techniques for approaching the problems.
I certainly learned a few things from the solutions, though I think there were a couple of bugs in some of the solutions, in particular doing a binary search using a mid point calculated via (low + high)/2 can cause a problem if you use an integer datatype in languages like C where the addition can overflow and change sign.
Good fun, and good for keeping the brain exercised, the book seems to emphasise working for Microsoft or Google which I don’t believe is everyone’s dream. Some good questions.