Find the maximum length string that is a subsequence of x and a substring of y.
Unlock detailed company stats for this questionUpgrade
Example: x = "abcd", y = "abdc" gives 3, and x = "hackerranks", y = "hackers" gives 7. Both lengths are up to 2000, lowercase letters only.
Also asked as · Given strings x and y, find the length of the longest subsequence of x that is also a substring of y.
Community answers
No answers contributed by the community yet.


