- LeetCode 206 – Reverse Linked List
The most-asked list question there is, and it is asked because four assignments in the wrong order lose the rest of the list. Save the successor before overwriting the link, return previous rather than current — and it is a building block for half the harder list problems.
- LeetCode 205 – Isomorphic Strings
A one-map solution that is wrong and a two-map solution that is right, separated by a single word in the problem statement. The pair badc / baba passes every consistency check and is still not isomorphic, because b and d both map to b.
- LeetCode 204 – Count Primes
A problem about knowing an algorithm rather than deriving one. What is actually tested is the two optimisations that make the sieve fast — stop at sqrt(n), start the inner loop at p*p — and whether you can say why both follow from one fact.
- MongoDB – Text Search
Text indexes and field weights, the one-per-collection limit, and the point where you should stop and reach for a real search engine.
- LeetCode 203 – Remove Linked List Elements
The problem that proves the dummy-head rule problem 83 stated. Here the head CAN be removed, repeatedly, so the dummy stops being a preference and becomes what makes the code short. And you must return dummy.next, never head.