Redirecting to
NADOS

Suffix Tree - Application 3 - Longest Common Substring

Given 2 strings, print the length of longest common substring and print the start points of the same
Input Format
Input consists of 2 lines, each containing a string.
Output Format
Print the length of longest common substring, and all the start points of the same in the next line
Question Video
Constraints
|S1|,|S2| <= 10^5
Sample Input
pepcoder
xyzcoderpep
Sample Output
5
3 12


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name