Longest Common Subsequence of Three Strings
Given lowercase alphabet strings a, b, and c, return the length of their longest common subsequence.
Constraints
0 ≤ n ≤ 100wherenis the length ofa0 ≤ m ≤ 100wheremis the length ofb0 ≤ k ≤ 100wherekis the length ofc
https://binarysearch.com/problems/Longest-Common-Subsequence-of-Three-Strings
Examples
Example 1
Input
- a =
epidemiologist - b =
refrigeration - c =
supercalifragilisticexpialodocious
Output
- answer =
5
Explanation
The longest common subsequence is “eieio”.
Leave a comment