Sigma Computing Interview Question

Cycle detection for a graph from the initial take-home