Medium Problemsstringoptimization

Longest Common Subsequence

Given two strings, find the length of their longest common subsequence: characters that appear in both strings in the same relative order, though not necessarily next to each other.

Do this lesson first: longest common subsequence

The full breakdown and animated table for this problem are still being written. In the meantime, run the four questions on it yourself — that is the whole exercise.