Challenge: Shortest Common Supersequence(SCS)
Given two strings, write a function to find the length of their shortest common superstring. A superstring is a string which has both input strings as substrings.
The length of their shortest common supersequence
s1 = "abcf"
s2 = "bdcf"
The shortest common supersequence of the two strings above will be
abdcf and the following would be the output:
result = 5
First, take a close look at this problem and design a step-by-step algorithm before jumping to the implementation. This problem is designed for your practice, so try to solve it on your own first. If you get stuck, you can always refer to the solution provided in the solution section. Good luck!