DFS
| Property | Details |
|---|---|
| time | O(n) |
| When Recursive | Set |
| Without Recursion | Stack needed |
BFS
Usually, non recursive.
| Property | Details |
|---|---|
| time | O(n) |
| Data Structure | Queue and Set |
Dijkstra’s Shortest Path
| Property | Details |
|---|---|
| time | O(ElogV) |
| Data Structure | Heap (priority queue) and Sets |
E:Edges, V:Vertices