previous
|
index
BFS/DFS Efficiency Comparison Summary
BFS
DFS
Time
O(V+E)
O(V+E)
Space
O(a
d
)
O(a × d)
previous
|
index