Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Disposable teleports solution in Uncategorized category for Disposable Teleports by capback250
neiborFinde = lambda neib, data: [x[0] if x[1] == neib else x[1] for x in data if neib in x]
def checkio(text):
rawData = text.split(',')
return ''.join(recur(rawData, '1', [], [])[0])
def recur(coords, current, paths, path):
if path and current == '1' and len(set(path)) == 8:
paths.append(path)
return paths
for neibor in neiborFinde(current, coords):
copyCors = coords[:]
copyPath = path[:]
if not copyPath:
copyPath.append('1')
copyPath.append(neibor)
if current+neibor in copyCors:
copyCors.remove(current+neibor)
else:
copyCors.remove(neibor+current)
recur(copyCors, neibor, paths, copyPath)
return paths
Feb. 1, 2016