Graphenalgorithmen
Gehe Graphenalgorithmen Schritt für Schritt durch und beobachte, wie sie Knoten und Kanten durchlaufen.
Graphenalgorithmen-Vergleich
| Algorithmus | Zeit | Speicher | Löst | Gewichtet |
|---|---|---|---|---|
| Depth-First Search | O(V + E) | O(V) | Traversal | No |
| Breadth-First Search | O(V + E) | O(V) | Traversal / shortest path | No |
| Topological Sort | O(V + E) | O(V) | Ordering (DAG) | No |
| Dijkstra's Algorithm | O((V + E) log V) | O(V) | Shortest path | Yes (non-negative) |
| Bellman-Ford Algorithm | O(V · E) | O(V) | Shortest path | Yes (± weights) |
| Kruskal's Algorithm | O(E log E) | O(V) | Minimum spanning tree | Yes |
| Prim's Algorithm | O(E log V) | O(V) | Minimum spanning tree | Yes |