Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Speedy category for Determine the Order by _Chico_
from collections import OrderedDict
def checkio(data):
data = [''.join(OrderedDict.fromkeys(d)) for d in data]
unique_data = sorted(set(''.join(data)))
ret = ""
while unique_data:
for c in unique_data:
if not any(c in d[1:] for d in data):
ret += c
break;
data = [d.replace(c,"") for d in data]
unique_data.remove(c)
return ret
May 17, 2021