Google interview question

Graph problem. Involving to do a topological sort.