Explains prefix-sum construction and range queries, then applies the technique to several subarray-sum problems.
Explains prefix-sum construction and range queries, then applies the technique to several subarray-sum problems.
Compare three coin-change problems and the DP modeling differences among minimum coins, combinations, and permutations.
Model the stock-trading family as a state machine and systematically derive DP states and transitions under different transaction limits.
Uses several dynamic-programming problems to explain state selection, subproblem design, and state dependencies.
Uses maximum-subarray problems to explain subproblems defined by subarrays ending at a specific position.
Derive the 2D dynamic-programming state, recurrence, and operation-order optimization for edit distance from its recursive subproblems.
Dynamic programming can recover a concrete optimal solution, not only an objective value. This article uses House Robber and longest common subsequence to show how a back array reconstructs the solution.
Uses longest common subsequence to explain two-dimensional subproblems, recurrences, and space optimization.
Uses House Robber to derive four steps for defining subproblems, recurrences, evaluation order, and space optimization.
Compares DFS and BFS while explaining level-order traversal, shortest paths, and multi-source BFS.