Citadel Securities interview question

Cycle detection in a directed graph