Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
4 lines - redundant calcs solution in Clear category for How to Find Friends by CDG.Axel
def check_connection(network, first, second):
network, fs = [set(e.split('-')) for e in network], {first}
[fs.update(*[e for e in network if e & fs]) for _ in network]
return second in fs
Nov. 13, 2021
Comments: