Solving the Longest Common Substring Problem
Let's solve the Longest Common Substring problem using Dynamic Programming.
Statement
Given two strings s1
and s2
, you have to find the length of the Longest Common Substring (LCS) in both these strings.
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.