Number of Shortest Supersequences

Правка en1, от Aayushi_Bhardwaj_Pataka, 2018-03-09 10:57:08

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.

Теги string, #dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Aayushi_Bhardwaj_Pataka 2018-03-09 10:57:08 393 Initial revision (published)