- LeetCode 144 – Binary Tree Preorder Traversal
The easiest of the three traversals to write iteratively, and worth doing right after inorder because the contrast explains why: a preorder node is emitted the moment you arrive, so there is nothing to come back for. Push right before left, since a stack reverses what you give it.
- MySQL – Backup and Restore with mysqldump
Taking a backup you can actually restore from. mysqldump for one database, several, or all, --single-transaction and why omitting it locks your tables, schema-only and data-only dumps, --routines and --events which are NOT included by default, restoring, why a dump is a logical backup and what that costs at size, and the only test that matters — restoring it somewhere and looking.
- 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.