Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for How to Find Friends by mistnarwhal
def check_connection(network, first, second):
for relation in network:
if first in relation:
if second in relation:
return True
firstBis = relation.replace(first,'').replace('-','')
if check_connection(tuple(x for x in network if x != relation),firstBis,second):
return True
return False
Sept. 25, 2015