Explores all nodes at the present depth before moving on to nodes at the next depth level.
O(V + E)
O(V)