Citadel Securities interview question

Graph Related - Depth First Search