2800. Shortest String That Contains Three Strings
Given three strings
a,b, andc, your task is to find a string that has the minimum length and contains all three strings as substrings.If there are multiple such strings, return the lexicographically smallest one.
Return a string denoting the answer to the problem.
Notes
- A string
ais lexicographically smaller than a stringb(of the same length) if in the first position whereaandbdiffer, stringahas a letter that appears earlier in the alphabet than the corresponding letter inb.- A substring is a contiguous sequence of characters within a string.