Pergunta de entrevista da empresa Atlassian

A graph question, and some data structures