Google Interview Question

Implement a topological sort algorithm.