I applied topological sort using DFS in this question but i did not get how to store the answer in input order. I got WA in one test case.
https://ideone.com/4u0Gqa MY code.
I applied topological sort using DFS in this question but i did not get how to store the answer in input order. I got WA in one test case.
https://ideone.com/4u0Gqa MY code.