- LeetCode 142 – Linked List Cycle II
Reset one pointer to the head after they meet and both walk to the cycle's entrance. It looks like a coincidence and it is four lines of algebra: t = k*c - m. Deriving that is what separates recall from understanding — and it is the same trick behind Find the Duplicate Number.
- LeetCode 141 – Linked List Cycle
Where Floyd's tortoise and hare earns its keep. The hash set is correct and obvious; the two-pointer version is constant space and rests on an argument you should be able to give, because "they meet eventually" is an assertion. The gap closes by exactly one per step, so it must pass through zero.
- Designing a Notification System
One system, three channels, and every hard part in the delivery guarantees. Provider abstraction so a failing vendor is a config change, fan-out that survives a burst, retries and deduplication when delivery is at-least-once, the preference and opt-out rules that are a legal requirement rather than a feature, rate control so a bug cannot send ten thousand emails, and the templating that keeps copy out of code.
- LeetCode 139 – Word Break
Where greedy string matching visibly fails and DP visibly saves it, with a counterexample small enough for a whiteboard. The reframing is the usual one — can the first i characters be built? — and dp[0] = true is doing real work. Plus why the dictionary must be a set.
- LeetCode 138 – Copy List with Random Pointer
Clone Graph in a linked list's clothes: you cannot point at a node that does not exist yet, and random pointers point forwards. The map answer is short and correct. The O(1) answer stores the mapping inside the list itself by weaving each copy in after its original.