- MySQL – LAST_INSERT_ID
Getting the AUTO_INCREMENT id of the row you just inserted, which is exactly what you need when saving an order and then its line items. Why LAST_INSERT_ID() is per-connection and therefore safe under concurrency, what it returns after a multi-row INSERT, why it does not see a trigger's own inserts, and how JDBC's `getGeneratedKeys` exposes the same thing to Java.
- MySQL – DELETE
Removing rows, and the several ways to regret it. DELETE with WHERE, DELETE with a JOIN, deleting in batches so a big cleanup does not hold one enormous transaction, TRUNCATE versus DELETE and what each does to AUTO_INCREMENT, what ON DELETE CASCADE takes with it, and soft delete — the `deleted` flag the pizza schema uses so a historical order never loses the product it referenced.
- LeetCode 62 – Unique Paths
The cleanest introduction to grid DP there is, and worth doing carefully because the next two problems are this one with a single detail changed. Deriving the recurrence from what was the last move, compressing the table to one row and why the sweep direction makes that work, and why the combinatorial closed form is a footnote.
- LeetCode 58 – Length of Last Word
A warm-up, and on the list because it is one — easy problems are where interviewers watch how you write rather than whether you can. split()[-1] is correct and allocates the whole string to read one word. Scan backwards instead: O(1) space, and end - i needs no plus one.
- LeetCode 57 – Insert Interval
The list arrives sorted and non-overlapping, and re-sorting it throws away the precondition the problem went out of its way to give you. Three sequential loops sharing one index and no if statements, why absorbing needs a min as well as a max, and why the binary-search refinement does not change the complexity.