filmov
tv
Given two strings ‘X’ and ‘Y’, find the length of the longest common substring.
![preview_player](https://i.ytimg.com/vi/WKWEQOvZtHs/maxresdefault.jpg)
Показать описание
Given two strings ‘X’ and ‘Y’, find the length of the longest common substring.
Input : X = "abcdxyz", y = "xyzabcd"
Output : 4
The longest common substring is "abcd" and is oflength 4.
Input : X = "zxabcdezy", y = "yzabcdezx"
Input : X = "abcdxyz", y = "xyzabcd"
Output : 4
The longest common substring is "abcd" and is oflength 4.
Input : X = "zxabcdezy", y = "yzabcdezx"