Back

find the longest common substring?

Created 2 years ago
61 Views
2 Comments
SakthivelHmOLkh
@SakthivelHmOLkh
SakthivelHmOLkh
@SakthivelHmOLkhProfile is locked. Login

Given 2 strings S and A find the longest common substring.If no common substring is found print '-1'
Input Size : |s| <= 1000, |A| <= 1000
Sample Testcase :
INPUT
codekata code
OUTPUT
code

Comments (2)
Please login to comment.