X interview question

A question related to Graph.