Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Disposable Teleports by TovarischZhukov
def find(stack, data, curr, path):
if path and path[-1] == "1" and len(set(path)) == 8:
stack.append(path)
return stack
for i, elem in enumerate(data):
if curr in elem:
val = elem[0] if curr == elem[1] else elem[1]
d = data[:]
del d[i]
find(stack, d, val, "%s%s" % (path , val) if path else elem)
return stack
def checkio(data):
return find([], data.split(","), "1", "")[0]
Dec. 7, 2015