You are given two strings s and t. A subsequence of a string is obtained by deleting zero or more characters without changing the order of the remaining characters.
Return the length of the longest common subsequence (LCS) between s and t.
s
,
t
s
and
t
0 <= len(s), len(t) <= 1000
s = "abcde"
,
t = "ace"
→ output
3
(LCS could be
"ace"
)
s = "abc"
,
t = "def"
→ output
0