Pregunta de entrevista de Atlassian

A graph question, and some data structures