Skip to content

Instantly share code, notes, and snippets.

View RemLawrence's full-sized avatar
🐇
I may be slow to respond.

Micah.W RemLawrence

🐇
I may be slow to respond.
View GitHub Profile
@RemLawrence
RemLawrence / dfs-bfs-non-recursive.js
Created November 24, 2019 23:24 — forked from DmitrySoshnikov/dfs-bfs-non-recursive.js
Non-recursive DFS and BFS algorithms
/**
* Depth-first and Breadth-first graph traversals.
*
* In this diff we implement non-recursive algorithms for DFS,
* and BFS maintaining an explicit stack and a queue.
*
* by Dmitry Soshnikov <[email protected]>
* MIT Style license
*/