The   '''[[wp:shortest common supersequence|shortest common supersequence]]'''   is a problem closely related to the   [[longest common subsequence]],   which you can use as an external function for this task. ;;Task: Given two strings u and v, find the shortest possible sequence s, which is the shortest common super-sequence of u and v where both u and v are a subsequence of s. Defined as such, s is not necessarily unique. Demonstrate this by printing s where u = abcbdab” and v = bdcaba”. ;Also see: * [[wp:Shortest_common_supersequence_problem|Wikipedia: shortest common supersequence]]