BFS/DFS Efficiency Comparison Summary

BFS DFS
Time O(V+E) O(V+E)
Space O(ad) O(a × d)

The difference between BFS and DFS can be seen clearly by applying them to a maze solving problem.