Skip to content
ı
Workspace
Visualizer
Search anything…
⌘ K
Desk
Path
Problems
Review
More
Library
/
Longest Common Subsequence (LCS)
dynamic programming
Best
O(n · m)
Avg
O(n · m)
Worst
O(n · m)
Space
O(n · m)
Preparing Longest Common Subsequence (LCS)...
Constructs 2D DP table comparing string prefixes and traces back diagonal and adjacent transitions.