Harness interview question

Topo Sort and other basic DSA