A String S is an interspersal of a set of Strings W, if W is a set of disjoint subsequences of S which cover S. Less formally, S can be formed from W by partitioning each member of W into substrings, then concatenating all the substrings, while maintaining the order of the substrings within each element of W. For example, if W contains the strings {"DESIGN", "ALGORITHM", "MARATHON"}, then one possible interspersal would be "ADELGMAORARISIGNTHMTHON", formed as shown below.
DE SIGN
A LG O RI THM
MA RA THON
-----------------------
ADELGMAORARISIGNTHMTHON
Given a String[] W, return the lexicographically minimum interspersal of the Strings in W |