LCS Again!
Practice
3.8 (5 votes)
Binary search algorithm
String
Hard
Algorithms
Hash function
Hashing algorithm
Problem
80% Success 10900 Attempts 50 Points 3s Time Limit 256MB Memory 1024 KB Max Code
Given two strings \(s\) and \(t\) consisting of only lowercase English alphabets, find the length of Longest Common Substring of the two strings.
Input:
The first line contains a string \(s\) of length \(n\).
The second line contains a string \(t\) of length \(m\).
Output:
Output a single line denoting the length of Longest Common Substring of the two strings.
Constraints:
\(1 \le n, m \le 10^5 \)
It is guaranteed that the strings \(s\) and \(t\) only contains lowercase English alphabets.
Submissions
Please login to view your submissions
Similar Problems
Points:50
Tags:
AlgorithmsHardApprovedStringHashing algorithm
Points:50
5 votes
Tags:
String AlgorithmsAlgorithmsHashing algorithmHashing Algorithm
Points:50
Tags:
StringHardAlgorithmsOpenApprovedHashing algorithm
Editorial