16 - Shortest Common Supersequence - Dynamic Programming Approach 2

@Rishi Srivastava Example 2: Input: str1 = “geek“, str2 = “eke“ Output: “geeke“ 1) Find Longest Common Subsequence (LCS) of two given strings. For example, LCS of “geek” and “eke” is “ek”.  2) Insert non-LCS characters (in their original order in strings) to the LCS found above, and return the result. So “ek” becomes “geeke” which is shortest common supersequence. Github: Leetcode:
Back to Top