You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Topological Sort/README.markdown
+4-4
Original file line number
Diff line number
Diff line change
@@ -20,15 +20,15 @@ The in-degree of a node is the number of incoming edges to that node. All nodes
20
20
21
21
If you think about it in the context of the previous example these nodes represent algorithms that don't need anything else to be learnt, hence the sort starts with them.
22
22
23
-
### Step 2: Use depth first search for traversal
23
+
### Step 2: Depth first search for traversal
24
24
25
-
Depth first search is an algorithm that is used to traverse a graph. This algorithm traverses all the child nodes recursively and uses backtracking to find other edges.
25
+
Depth first search is an algorithm that is used to traverse a graph. This algorithm traverses all the child nodes recursively and uses backtracking.
26
26
27
-
To know more about this algorithm please take a look at the explanation here.
27
+
To know more about this algorithm please take a look at the explanation [here](https://github.com/hollance/swift-algorithm-club/tree/master/Depth-First%20Search).
28
28
29
29
### Step 3: Remember all visited nodes
30
30
31
-
The last step of the sort is to maintain a list of all the nodes that have already been visited.
31
+
The last step of the sort is to maintain a list of all the nodes that have been visited. This is to avoid visiting the same node twice.
0 commit comments