- LeetCode 136 – Single Number
The problem that teaches XOR as a tool rather than a curiosity. Linear time and constant space rule out both obvious answers, and what is left is a one-line fold — which looks like magic until you name the three properties, including the commutativity that handles unsorted input.
- LeetCode 134 – Gas Station
Eight lines of code and a proof that is the entire interview. Why a non-negative total guarantees a solution exists, and why running dry at station i rules out every start from the current candidate through i — which is what makes it one pass instead of quadratic. The reset is Kadane, read differently.
- LeetCode 133 – Clone Graph
The traversal is the easy part. One hash map does two jobs — visited set and old-to-new mapping — and one line decides whether the function terminates at all: register the clone BEFORE recursing, or an undirected edge sends you straight back and never bottoms out.
- MongoDB – Data Modeling: Embed or Reference
The one decision that shapes every MongoDB schema, with the 16 MB limit, unbounded growth and the real cost of denormalization.
- MySQL – Reset the Root Password
Locked out of your own server. The `--skip-grant-tables` procedure step by step on MySQL 8, why FLUSH PRIVILEGES is required before ALTER USER will work in that mode, the `--init-file` alternative that avoids opening the server up at all, doing it in a Docker container where the answer is usually simpler, and the check to run afterwards to confirm you did not leave the server unauthenticated.