Coding dp
House Robber I / II
LC 198, 213. Recurrence first. Circle case = two linear runs.
LC 198, 213. Recurrence first. Circle case = two linear runs.
LC 322. Unbounded knapsack. Why greedy fails. Sentinel for impossible.
LC 300. O(n²) first, then patience-sort O(n log n) if time.
Access pattern, transactions, fan-out. Say what you give up with each pick.