- LeetCode 118 – Pascal's Triangle
The gentlest bottom-up DP there is, and on the list as the setup for its follow-up. The edges are where the rule runs out of inputs rather than a special case bolted on, the output size IS the complexity so there is nothing to optimise — which is exactly why problem 119 asks for one row.
- MySQL – Triggers
Running a statement automatically when a row changes. BEFORE and AFTER, INSERT, UPDATE and DELETE, the NEW and OLD rows, writing an audit trail, keeping a derived total in step, the limitations that bite — a trigger cannot touch its own table, and it does not fire for TRUNCATE — and the real argument against them: logic that runs invisibly is logic nobody debugging your application will think to look for.
- MongoDB – Query Operators
Comparison, logical, element and array operators, plus projection — the vocabulary every later query is built from.
- LeetCode 114 – Flatten Binary Tree to Linked List
The best problem on the list for the idea that pointer surgery can replace a data structure. Three solutions using O(n), O(h) and O(1) space — the last one splices the right subtree onto the left subtree's rightmost node, which is Morris threading kept rather than undone.
- LeetCode 112 – Path Sum
A three-line recursion containing a base case almost everyone writes wrong. Returning targetSum == 0 at a null accepts a path that stops at a non-leaf, and it passes the examples while failing on a four-node tree. Null is not a leaf. Plus why negative values kill the obvious pruning.