Ask Question
5 October, 05:34

Topological sort requires only a tiny addition to the DFS algorithms. Exactly one of the following data structures is required to make it work (although the code in the textbook uses two---only one is essential.)

Question 1 options:

Queue

Deque

Stack

Hash Table

+5
Answers (1)
  1. 5 October, 05:39
    0
    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.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Topological sort requires only a tiny addition to the DFS algorithms. Exactly one of the following data structures is required to make it ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers