Learn
Practice notes for technical interviews
- Before you go quiet to think, say which question you are answering
One ambiguous word, the four-number input that exposes it, and the three sentences that turn a silent pause into evidence of how you think.
- Your comparator subtracts, and two large numbers sort the wrong way round
Why a - b in a Java comparator breaks on two values that fit in an int, the input that shows it, and the sentence that replaces it.
- You solved it last month and cannot start it again today
A seven-day practice order for problems you recognise but cannot rebuild from a blank file, with what each day checks.
- Your binary search forgot that the answer can be past the end
A lower-bound search that passes the sample and fails on a one-element array, and the two-line invariant that makes the bounds obvious.
- In a behavioral round, say the decision that was yours
A story told as "we did" hides the one thing the interviewer is scoring. How to find your own decision in it and retell it with its effect.
- In a code review round, lead with the defect that hurts someone
A six-line caching diff with three findings, and how to rank them by who gets hurt, when it shows, and whether it can be undone.
- Should the unread badge be counted when you read it or when mail arrives
One small requirement, two designs, the price of each, and the single question that tells you which one to draw first.
- A passing sample test is not the whole test
The sample input passes, you say "done", and the interviewer types an empty array. One exercise to catch the assumption you never said out loud.