Redirecting to
NADOS

Longest Common Substring (2 Strings)

Given 2 strings, print the longest common substring.
Input Format
An integer N.
2 strings S1, S1
Output Format
Print the longest common substring.
Question Video
Constraints
|S1|,|S2| <= 10^5
Sample Input
11
yzpepcoding
codingpepcd
Sample Output
coding


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name