VacuumLabs Interview Question

Diamond pattern DFS to detect cycles.