Google interview question

Test Cycle in a directed graph.