| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,6 +24,13 @@ | |||
| 24 | 24 | result.push(node); | |
| 25 | 25 | } | |
| 26 | 26 | ||
| 27 | + /** | ||
| 28 | + * Implements the topological sort algorithm. | ||
| 29 | + * | ||
| 30 | + * @public | ||
| 31 | + * @param {object} graph A graph represented with list of neighbors | ||
| 32 | + * @return {array} The list containing all nodes in topological sorted order | ||
| 33 | + */ | ||
| 27 | 34 | return function (graph) { | |
| 28 | 35 | var result = [], | |
| 29 | 36 | visited = [], | |
| Back | FazBrowse Home | New Git URL |
0 commit comments