Pergunta de entrevista da empresa Freenome

Graph traversal problem (implementing the data structures as well)