@Rishi Srivastava Example 1: Input: str1 = “abac“, str2 = “cab“ Output: “cabac“ 1) Find Longest Common Subsequence (LCS) of two given strings. For example, LCS of “abac” and “cab” is “ab”. 2) Insert non-LCS characters (in their original order in strings) to the LCS found above, and return the result. So “ab” becomes “cabac” which is shortest common supersequence. Github: Leetcode:
Hide player controls
Hide resume playing