🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Longest Common Subsequence

In plain terms

Finding the longest sequence common to two strings, preserving order.

Going deeper

LCS identifies the longest subsequence (not necessarily contiguous) appearing in both inputs in the same order. It's solved with dynamic programming.

Under the hood

O(mΒ·n) DP; underlies diff tools and bioinformatics sequence alignment.

Examples

Diff/version control, DNA alignment, plagiarism detection, spell suggestion.

Think of it like...

Like finding the longest shared storyline between two slightly different movie cuts.

Feedback & Bug Report