Return a list of nodes hit during a breadth first traversal in the order they were hit
Extend your graph object with a breadth-first traversal method that accepts a starting node. Without utilizing any of the built-in methods available to your language, return a collection of nodes in the order they were visited. Display the collection.
Time: O(n^2) Space O(n)
- !()[assets/BreadthFirstGraph.jpg]
- code