Aayushi_Bhardwaj_Pataka's blog

By Aayushi_Bhardwaj_Pataka, history, 7 years ago, In English

Given two strings s and t. Find the number of ways to make a new string c such that both s and t appear as subsequences in c and also c has minimum length among all such strings possible.

I was able to figure out that the shortest length will be len(s) + len(t) — len(lcs(s, t)) but unable to approach further via any recursive/combinatorial approach.

Full text and comments »