I was looking for help on some pseudo code for my programming homework. The details are found here but to some it up: I receive strings from a file then I need to combine all of them into the shortest possible string. For example ABC AAB CAB could turn into AABCAB because the letters in the strings overlap.
ABC
AAB
CAB
------
AABCAB
I have troubles understanding what logic I can use for this problem. I've thought of splitting the strings by their length-1 until I get a single character then look for that same character(s) in other strings but it wouldn't work that well.