Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
We can find the length of the longest common subsequence between str1[i:] and str2[j:] (for all (i, j)) by using dynamic programming.
We can use this information to recover the shortest common supersequence.