Ask Question
10 September, 04:51

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. 10 September, 05:06
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers