Citadel Interview Question

How would you detect cycles in a directed graph