Question DSA-GRAPH-0020
HardWhat does Kahn's algorithm for topological sorting use?
- A.
A queue of vertices with in-degree 0
- B.
A priority queue of edge weights
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Graphs question
What does Kahn's algorithm for topological sorting use?
A queue of vertices with in-degree 0
A priority queue of edge weights
Sign up free to see the answer and a step-by-step explanation.
A hash of vertex names
A stack of visited vertices only