- LeetCode 91 – Decode Ways
Climbing Stairs with the steps made conditional, and that one change means most wrong answers come from a single character: '0'. The recurrence takes a minute; the zeros take the rest of the interview. Why the two-digit gate needs a LOWER bound of 10, and why ways(0) must be 1.
- LeetCode 88 – Merge Sorted Array
Tagged Easy, with one idea worth more than most Mediums: when you write into an array you are also reading, go backwards. The trailing zeros are reserved space rather than data, forwards clobbers values it has not consumed, and looping on nums2 alone is what makes the remainder handle itself.
- LeetCode 83 – Remove Duplicates from Sorted List
Five lines with one bug in them that nearly everyone writes first: advancing after a deletion skips the node that just became the successor, and only three equal values in a row exposes it. Also the cleanest place to learn when a linked list needs a dummy head — exactly when the head itself can be removed.
- MySQL – Transactions
Making several statements succeed or fail together. START TRANSACTION, COMMIT and ROLLBACK, autocommit and why it is on by default, savepoints, the four isolation levels and what each one lets through, why MySQL's default is REPEATABLE READ when most databases use READ COMMITTED, SELECT ... FOR UPDATE, and the DDL statement that silently commits your transaction out from under you.
- LeetCode 81 – Search in Rotated Sorted Array II
Problem 33 with duplicates, which looks like a one-line change and is not. Two arrays with the pivot in different halves can present identical evidence at every point the algorithm may look, so no decision is right for both. The worst case is O(n) — and that bound is on the problem, not on your approach.