Goal:
Given a list of N strings, your task is to create a new string that incorporates all the strings from the list. The resultant string should be the shortest possible by taking advantage of overlapping sections between the strings.
Guidelines:
The resulting string should contain all the original strings entirely.
The strings from the list can appear in any order in the resulting string.
If multiple shortest strings are possible, returning any one of them is acceptable.
If there's no possible overlap among the strings, the result will simply be a concatenation of all the strings in the list.
All strings in the input list are unique.
Input:
A list of N strings, where each string has a length between 1 and 100 inclusive.
Output:
A single string that represents the most compressed combination of the given strings.
Example:
Given the input list:
strings = ["pleasure", "apple", "rendered", "clap", "suren"]A possible output is:
"clappleasurendered"