16
Counting, Measuring, and Ordering Puzzles
In addition to technical and programming problems, you sometimes encounter brainteasers in your interviews. Brainteasers are mathematical and logical puzzles that have indirect relation to computer programming.
Historically, many interviewers have thought that brainteasers are useful in assessing problem-solving ability—perhaps the most important job skill for a programmer—and brainteasers have featured heavily in programming interviews. We have generally believed that performance on brainteasers says a lot about how much experience you have with brainteasers and very little about whether you’re a good coder. We’ve been pleased to see that many leading companies (including Google, once infamous for its brainteasers) have asked interviewers to refrain from using these kinds of problems and to focus exclusively on technical and programming problems.
Nevertheless, you may encounter brainteasers in your interviews,...