##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
You know LIS with 1D states. Now work with two sequences simultaneously. LCS and Edit Distance are the basis of all string comparison algorithms.
The canonical LCS problem - master this first.
Classic Levenshtein distance with insert/delete/replace operations.
Requires reconstructing the actual LCS string, not just its length.
LCS of string with its reverse - elegant problem transformation.
Counts ways to form subsequence - extends LCS to combinatorics.
Covered with full walkthrough in this section.
Covered with full walkthrough in this section.
Covered with full walkthrough in this section.
Covered with full walkthrough in this section.
Modified LCS scoring. Teaches adapting classic DP to new objective functions.
Edit distance with operation reconstruction. Must output the actual edit sequence.
Transform sequences with weighted operations. Generalized edit distance with costs.
Check if s3 interleaves s1 and s2. 2D DP tracking positions in both strings.
Pattern matching with . and *. The hardest string matching DP - interview classic.
Minimum operations to make array uniform. Interval DP on strings.
Check if string can be formed from two disjoint subsequences. DP on two pointers.
Construct grid with string constraints. Pattern-based construction.
Count paths on tetrahedron. Matrix DP with state transitions.
Assign values satisfying comparison constraints. Graph + DP approach.
Check if 3 strings are disjoint subsequences. 3D DP with online updates.
Maximize profit with weapon/armor constraints. Segment tree + DP.
Count quadruples with equal endpoints. Prefix counting + DP.