We define a "Fresh" substring as a substring that is different from any other substring that starts earlier.
For example, if I take the string
"abababc" and split it:
["ab","ab","a","bc"], the first and the last substring are fresh, but the middle two are not, because they can be found earlier in the string.
For this challenge, you need create a list of the smallest possible fresh substrings for each position in the string. If there are no fresh substrings, output and empty list or empty string, etc.
For example, if you were passed
"ABABCBA", you should return
ABABCBA A,B,ABC,BC,C, // ABC instead of AB because there is an AB earlier in the string AAAAAAA A,,,,,, ABCDEFG A,B,C,D,E,F,G ABDBABDAB A,B,D,BA,ABDA,BDA,DA,, ACABCACBDDABADD A,C,AB,B,CAC,ACB,CB,BD,D,DA,ABA,BA,AD,,
The empty items are not mandatory.