- LeetCode 105 – Construct Binary Tree from Preorder and Inorder Traversal
The problem that makes traversal orders click: preorder tells you the root, inorder tells you the split. Why the hash map is what makes it O(n), why slicing arrays quietly reintroduces the quadratic, why the left subtree must be built first, and why preorder plus postorder is not enough.
- AWS – CloudFront: Caching, OAC and Edge Functions
A CDN is a cache, and a cache you cannot explain is an outage waiting. Origins and behaviours, cache policies and what actually forms the cache key, and Origin Access Control so the bucket behind it can stay private. Invalidation and why fingerprinted filenames beat it, the certificate that must live in us-east-1, and a CloudFront Function doing URL rewriting at the edge — including why it needs republishing.
- MySQL – Views
Naming a query so the rest of the schema can use it. CREATE VIEW and CREATE OR REPLACE VIEW, what a view costs at query time, MERGE versus TEMPTABLE and why the second one loses your indexes, updatable views and the conditions they have to meet, WITH CHECK OPTION, using a view as a permission boundary, and why MySQL has no materialized views and what people do instead.
- LeetCode 104 – Maximum Depth of Binary Tree
Three lines, and the smallest problem where the recursive shape of tree algorithms is visible. The real value is the trap it sets up: swapping max for min does NOT give minimum depth, because a node with one child is not a leaf and the null branch reports a path ending in mid-air.
- LeetCode 103 – Binary Tree Zigzag Level Order Traversal
Level order with the direction alternating, and the answer people reach for first — reversing the queue — is the one that breaks. How you traverse and how you report are different things, and modifying the traversal to change the output is a category error.