Why it matters
LCS is diff foundation. git diff, DNA alignment use.
Advertisement
The architecture
DP dp[i][j].
Match: +1; else max prev.
O(nm) time.
Advertisement
How it works end to end
DP table.
Hunt-Szymanski for similar.
Row-only space.