Atlassian Interview Question

A graph question, and some data structures