Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Lenghty, but clear. solution in Clear category for How to Find Friends by PearuPung
def check_connection(network, first, second):
connectionsList=[]
connectionsList.append(first)
for name in connectionsList:
for connection in network:
if name in connection and connectionsList.count(name)<=1:
newName= connection.replace(name,"").replace("-","")
connectionsList.append(newName)
return second in connectionsList
June 27, 2015