Shortest Common Supersequence
Medium

Problem Statement

Find the length of the shortest string that has both given strings as subsequences.

Examples

1Example 1
Input:
{ "s1": "AGGTAB", "s2": "GXTXAYB" }
Output:
9
2Example 2
Input:
{ "s1": "geek", "s2": "eke" }
Output:
5
3Example 3
Input:
{ "s1": "abac", "s2": "cab" }
Output:
5
Loading...

Sign in to Run Code and Submit