Compute the length of the longest common subsequence of two strings.
Usage:
import { longestComSubsequence } from "mazey";const ret = longestComSubsequence("fish", "finish");console.log(ret); Copy
import { longestComSubsequence } from "mazey";const ret = longestComSubsequence("fish", "finish");console.log(ret);
Output:
4 Copy
4
The first string.
The second string.
The length of the longest common subsequence.
Compute the length of the longest common subsequence of two strings.
Usage:
Output: