Overview
The breath-first algorithm was first developed by E. F. Moore in the 1950’s who first used it to find the shortest path through a maze.
Concept
Depth-first search is an algorithm for traversing a tree or graph data structure by starting at the root and continuing as far as possible along a branch before back tracking.
Algorithmic Complexity
Big-O
Algorithm | Data Structure | Time Complexity - Average | Time Complexity - Worst | Space Complexity - Worst |
---|---|---|---|---|
Breadth First Search | Graph of |V| vertices and |E| edges | - | O(|E|+|V|) | O(|V|) |
Implementation
Java Implementation
Coming soon!
References
Wikipedia: Breadth-first search