Skip to content

Commit 4f0d011

Browse files
committed
Add comments in the topological sort
1 parent eb4c6eb commit 4f0d011

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/graphs/others/topological-sort.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
(function (exports) {
22
'use strict';
33

4+
/**
5+
* Complexity O(|E|), where E is the set
6+
* which contains all edges and |E| is their count.
7+
*/
48
var topologicalSort = (function () {
59

610
function topologicalSortHelper(node, visited, temp, graph, result) {

0 commit comments

Comments
 (0)