Yahoo Interview Question

topo sort using DFS approach