Intuit Interview Question

A easy topological sort question