Question d’entretien chez Google

Graph problem. Involving to do a topological sort.