Anmol Mittal 0b27a9e631
feat: Add BFS and DFS algorithms to check for cycle in a directed graph (#816)
* feat: Add BFS and DFS algorithms to check for cycle in a directed graph

* Remove const references for input of simple types

Reason: overhead on access

* fix bad code

sorry for force push

* Use pointer instead of the non-const reference

because apparently google says so.

* Remove a useless and possibly bad Graph constuctor overload

* Explicitely specify type of vector during graph instantiation

* Minor documentation fixes.

* Fix bad code

why did I even do this lol.

* Some more fixes to the code

* Fix a comment.

* Use map instead of unordered_map for better performance when using map.find() function and make code compatible with C++11.

* Remove copyright line.
2020-07-19 12:06:29 -04:00
..