Easy Problemsstringoptimization

Longest Common Substring

Given two strings, find the length of their longest common substring: a run of characters that must appear contiguously, in the same order, within both strings.

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.