Citadel Securities Interview Question

Graph based and topological sort