Longest Common Substring

Hard · rating 1900 · Dynamic Programming, Strings

Read two strings, one per line. Print the length of their longest common contiguous substring.

For abcde and xbcdy the answer is 3 (bcd).

Constraints: 1 ≤ |s|, |t| ≤ 2000

Related problems

Open Longest Common Substring in Code Arena →