@@ -54,12 +54,13 @@ The following code will introduce how to optimize.
54
54
For a detailed description of ** Dijkstra's algorithm** , please refer to [ 1514. Path with Maximum Probability] ( ../1001-2000/1514-path-with-maximum-probability.md ) .
55
55
56
56
### Common graph theory algorithm comparison table
57
- | Algorithm name| Main application scenarios| Optimization methods| Importance| Difficulty| min_distances | Negative weights| Additional application scenarios|
57
+ | Algorithm name| Main application scenarios| Optimization methods| Importance| Difficulty| min _ < br >distances | Negative weights| Additional application scenarios|
58
58
| --------------| --------------------------| --------------------| ----------| ----------| -------------| ----------------| --------------------------------|
59
- | [ Prim's algorithm] ( ../1001-2000/1584-min-cost-to-connect-all-points.md ) | Minimum Spanning Tree | Heap Sort Simplify| Important | Medium | Used | Can handle||
60
- | [ Kruskal's algorithm] ( ../1001-2000/1584-min-cost-to-connect-all-points-2.md ) | Minimum Spanning Tree | No need | important | Relatively hard| Not used| Can handle| Relative: [ Undirected Graph Cycle Detection] ( ./684-redundant-connection.md ) , [ Directed Graph Cycle Detection] ( ./685-redundant-connection-ii.md ) |
61
- | [ Dijkstra's algorithm] ( ../1001-2000/1514-path-with-maximum-probability.md ) | Single-Source Shortest Path | Heap Sort | Very important| Relatively hard| Used | Cannot handle||
62
- | [ Bellman-Ford algorithm] ( ./743-network-delay-time.md ) | Single-Source Shortest Path | Queue-Improved | Very Important| Easy | Used | Can handle| [ Detect Negative Cycles] ( https://www.geeksforgeeks.org/detect-negative-cycle-graph-bellman-ford/ ) , <br >[ Shortest Hop-Bounded Paths] ( ./787-cheapest-flights-within-k-stops.md ) |
59
+ | [ Prim's algorithm] ( ../1001-2000/1584-min-cost-to-connect-all-points.md ) | Minimum Spanning Tree | Heap Sort Simplify| Important | Medium | Used | Can handle||
60
+ | [ Kruskal's algorithm] ( ../1001-2000/1584-min-cost-to-connect-all-points-2.md ) | Minimum Spanning Tree | No need | important | Relatively hard| Not used| Can handle| Relative: [ Undirected Graph Cycle Detection] ( ./684-redundant-connection.md ) , [ Directed Graph Cycle Detection] ( ./685-redundant-connection-ii.md ) |
61
+ | [ Dijkstra's algorithm] ( ../1001-2000/1514-path-with-maximum-probability.md ) | Single-Source Shortest Path | Heap Sort | Very important| Relatively hard| Used | Cannot handle||
62
+ | [ Bellman-Ford algorithm] ( ./743-network-delay-time.md ) | Single-Source Shortest Path | Queue-Improved | Very Important| Easy | Used | Can handle| [ Detect Negative Cycles] ( https://www.geeksforgeeks.org/detect-negative-cycle-graph-bellman-ford/ ) , <br >[ Shortest Hop-Bounded Paths] ( ./787-cheapest-flights-within-k-stops.md ) |
63
+ | [ Floyd–Warshall] ( ../1001-2000/1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.md ) | Multi-Source Shortest Path | No need | Less important| Relatively hard| Used | Can handle||
63
64
64
65
## Complexity
65
66
** V** : vertex count, ** E** : Edge count.
0 commit comments