small improvements, bug fixes, ocd formatting,
This commit is contained in:
2024-12-26 03:13:35 -07:00
parent fa9208940a
commit d999db53ae
28 changed files with 178 additions and 181 deletions

View File

@@ -9,13 +9,13 @@ const typedefs = require("../typedefs");
*
* Example:
* ```javascript
* let nodes = ['a', 'b', 'c', 'd', 'e'];
* let nodes = ["a", "b", "c", "d", "e"];
* let edges = [
* { from: 'a', to: 'b' },
* { from: 'b', to: 'c' },
* { from: 'c', to: 'd' },
* { from: 'd', to: 'a' },
* { from: 'e', to: 'a' }
* { from: "a", to: "b" },
* { from: "b", to: "c" },
* { from: "c", to: "d" },
* { from: "d", to: "a" },
* { from: "e", to: "a" }
* ];
* let g = new myGraph(nodes, edges);
* console.log(g.detectCycle()); // true