[LeetCode] Shortest String That Contains Three Strings

1 · · July 30, 2023, 10:39 a.m.
2800. Shortest String That Contains Three Strings Given three strings a, b, and c, 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 a is lexicographically smaller than a string b (of the same length) if in the first position where a and b differ, string a has a letter that appears earlier in the ...