Pregunta de entrevista de Wayground

Some DSA problem around graph. Heaps