183. Longest Common Subsequence

Given two strings text1 and text2. Return the length of their longest common subsequence.
Example 1
Input: text1 = "abcde", text2 = "ace"
Output: 3
Explanation: Common subsequence "ace".
Example 2
Input: text1 = "abc", text2 = "def"
Output: 0
Explanation: No common characters.
dynamic programmingmediumstrings
JavaScript
Line 1, Char 1