Intuit Interview Question

How to check if a graph has no cycles.