Medium · Dynamic programming
Longest Common Subsequence
You are given two strings. Return the length of the longest sequence of letters that appears in both, in the same order, though not necessarily side by side.
- If they share nothing, the answer is 0.
- Everything is lowercase letters.
- Letters keep their order but may have others between them.
a = "abcde" b = "ace" → 3 (ace)Record your take