(This question is a variation of the LeetCode question 1143. Longest Common Subsequence. If you haven't completed that question yet, it is recommended to solve it first.)
Given two strings x and y, return the length of the longest subsequence of x that is also a substring of y. If no non-empty match exists, return 0.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected