Ask Question
9 November, 21:56

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 November, 01:54
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers