Topological sort

Samanatha123

New member
Joined
May 3, 2021
Messages
7
Topological sort.png
Still having trouble with topological sort and dfs. Any ideas on how to take the best approach?
 
View attachment 26933
Still having trouble with topological sort and dfs. Any ideas on how to take the best approach?
Were you taught a method for either listing or counting such sorts, or are you to create a method? Without knowing what you have been taught, or seeing your attempt, it's hard to know what sort of trouble you are having.

But I would start by finding all possible start nodes, and then for each of those, see what you can do based on whatever you have been taught. If you haven't been shown a method, don't worry about taking the "best approach"; just do something, and learn as you go. Then show us what you have done, so we can make suggestions.
 
Top