Breadth-first traversal (or search) is a graph traversal algorithm that explores all the vertices of a graph in breadthward motion. In other words, it visits all the vertices at the same level before moving on to the next level. The algorithm starts at the root (or an arbitrary node) and explores its neighbors before moving on to their neighbors. This process continues until all vertices are visited. Breadth-first traversal is often used in graph algorithms, such as finding the shortest path between two nodes. Click here to find more info

- V: # of nodes in graph
- E: # of edges in graph
- Time Complexity
- adjacency matrix: O(V^2)
- adjacency list: O(V+E)

- Space Complexity: O(V)