Nutanix interview question

Hard DSA problem which was tree+graph based question.