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
- Word Break — Hard
- Edit Distance — Hard
- Longest Common Subsequence — Hard
- Longest Palindromic Substring — Hard
- 0/1 Knapsack — Hard
- Coin Change (Count Ways) — Hard