Answer:
Stack.
Explanation:
Topological sort requires a bit of addition to DFS algorithm.So DFS can be done by two ways that are either you can use recursion or you can use Stack data structure to implement DFS.
Since recursion uses stack memory when it makes recursive calls and if you want to do it iteratively you can stack data structure.