Skip to content

Commit e607a79

Browse files
committed
更新章节目录链接
1 parent c7d9baa commit e607a79

16 files changed

+113
-39
lines changed

Assets/Origins/README-Catalogue-List.md

+10-13
Original file line numberDiff line numberDiff line change
@@ -128,21 +128,18 @@
128128
- [图的拓扑排序知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/02.Graph-Traversal/05.Graph-Topological-Sorting.md)
129129
- [图的拓扑排序题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/02.Graph-Traversal/06.Graph-Topological-Sorting-List.md)
130130
- 图的生成树
131-
- [图的最小生成树](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
131+
- [图的最小生成树知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
132132
- [图的最小生成树题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/03.Gaph-Spanning-Tree/02.Gaph-Minimum-Spanning-Tree-List.md)
133133
- 最短路径
134-
- [单源最短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path.md)
135-
- [Dijkstra 算法](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/02.Graph-Dijkstra.md)
136-
- [Bellman-Ford 算法](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/03.Graph-Bellman-Ford.md)
137-
- [SPFA 算法](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/04.Graph-SPFA.md)
138-
- [单源最短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/05.Graph-Single-Source-Shortest-Path-List.md)
139-
- [多源最短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/06.Graph-Multi-Source-Shortest-Path.md)
140-
- [Floyed 算法](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/07.Graph-Floyed.md)
141-
- [多源最短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/08.Graph-Multi-Source-Shortest-Path-List.md)
142-
- [次短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/09.Graph-The-Second-Shortest-Path.md)
143-
- [次短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/10.Graph-The-Second-Shortest-Path-List.md)
144-
- [差分约束系统知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/11.Graph-System-Of-Difference-Constraints.md)
145-
- [差分约束系统题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/12.Graph-System-Of-Difference-Constraints-List.md)
134+
- [单源最短路径知识(一)](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path-01.md)
135+
- [单源最短路径知识(二)](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/02.Graph-Single-Source-Shortest-Path-02.md)
136+
- [单源最短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/03.Graph-Single-Source-Shortest-Path-List.md)
137+
- [多源最短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/04.Graph-Multi-Source-Shortest-Path.md)
138+
- [多源最短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/05.Graph-Multi-Source-Shortest-Path-List.md)
139+
- [次短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/06.Graph-The-Second-Shortest-Path.md)
140+
- [次短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/07.Graph-The-Second-Shortest-Path-List.md)
141+
- [差分约束系统知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/08.Graph-System-Of-Difference-Constraints.md)
142+
- [差分约束系统题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/09.Graph-System-Of-Difference-Constraints-List.md)
146143
- 二分图
147144
- [二分图基础知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/05.Graph-Bipartite/01.Graph-Bipartite-Basic.md)
148145
- [二分图基础题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/05.Graph-Bipartite/02.Graph-Bipartite-Basic-List.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
## 1. 单源最短路径的定义
2+
3+
> **单源最短路径(Single Source Shortest Path)**:对于一个带权图 $G = (V, E)$,其中每条边的权重是一个实数。另外,给定 $v$ 中的一个顶点,称之为源点。则源点到其他所有各个顶点之间的最短路径长度,称为单源最短路径。
4+
5+
这里的路径长度,指的是路径上各边权之和。
6+
7+
单源最短路径问题的核心是找到从源点到其他各个顶点的路径,使得路径上边的权重之和最小。这个问题在许多实际应用中都非常重要,比如网络路由、地图导航、通信网络优化等。
8+
9+
常见的解决单源最短路径问题的算法包括:
10+
11+
1. **Dijkstra 算法**:一种贪心算法,用于解决无负权边的情况。它逐步扩展当前已知最短路径的范围,选择当前距离起始节点最近的节点,并更新与该节点相邻的节点的距离。
12+
2. **Bellman-Ford 算法**:适用于有负权边的情况。它通过多次迭代来逐步逼近最短路径,每次迭代都尝试通过更新边的权重来缩短路径。
13+
3. **SPFA 算法**:优化的 Bellman-Ford 算法,它在每次迭代中不遍历所有的边,而是选择性地更新与当前节点相关的边,从而提高了算法的效率。
14+
15+
这些算法根据图的特点和问题的需求有所不同,选择适合的算法可以在不同情况下有效地解决单源最短路径问题。
16+
17+
## 2. Dijkstra 算法
18+
19+
### 2.1 Dijkstra 算法的算法思想
20+
21+
> **Dijkstra 算法的算法思想**:通过逐步选择距离起始节点最近的节点,并根据这些节点的路径更新其他节点的距离,从而逐步找到最短路径。
22+
23+
### 2.2 Dijkstra 算法的实现步骤
24+
25+
### 2.3 Dijkstra 算法的实现代码
26+
27+
```Python
28+
29+
```
30+
31+
## 3. Bellman-Ford 算法
32+
33+
### 3.1 Bellman-Ford 算法的算法思想
34+
35+
### 3.2 Bellman-Ford 算法的实现步骤
36+
37+
### 3.3 Bellman-Ford 算法的实现代码
38+
39+
```Python
40+
41+
```
42+
43+
## 4. SPFA 算法
44+
45+
### 4.1 SPFA 算法的算法思想
46+
47+
### 4.2 SPFA 算法的实现步骤
48+
49+
### 4.3 SPFA 算法的实现代码
50+
51+
```Python
52+
```
53+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### 单源最短路径题目
2+
3+
| 题号 | 标题 | 题解 | 标签 | 难度 |
4+
| :------ | :------ | :------ | :------ | :------ |
5+
| 0407 | [接雨水 II](https://leetcode.cn/problems/trapping-rain-water-ii/) | | 广度优先搜索、数组、矩阵、堆(优先队列) | 困难 |
6+
| 0743 | [网络延迟时间](https://leetcode.cn/problems/network-delay-time/) | | 深度优先搜索、广度优先搜索、图、最短路、堆(优先队列) | 中等 |
7+
| 0787 | [K 站中转内最便宜的航班](https://leetcode.cn/problems/cheapest-flights-within-k-stops/) | | 深度优先搜索、广度优先搜索、图、动态规划、最短路、堆(优先队列) | 中等 |
8+
| 1631 | [最小体力消耗路径](https://leetcode.cn/problems/path-with-minimum-effort/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/1631.%20%E6%9C%80%E5%B0%8F%E4%BD%93%E5%8A%9B%E6%B6%88%E8%80%97%E8%B7%AF%E5%BE%84.md) | 深度优先搜索、广度优先搜索、并查集、数组、二分查找、矩阵、堆(优先队列) | 中等 |
9+
| 1786 | [从第一个节点出发到最后一个节点的受限路径数](https://leetcode.cn/problems/number-of-restricted-paths-from-first-to-last-node/) | | 图、拓扑排序、动态规划、最短路、堆(优先队列) | 中等 |
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### 多源最短路径题目
2+
3+
| 题号 | 标题 | 题解 | 标签 | 难度 |
4+
| :------ | :------ | :------ | :------ | :------ |
5+
| 0815 | [公交路线](https://leetcode.cn/problems/bus-routes/) | | 广度优先搜索、数组、哈希表 | 困难 |
6+
| 1162 | [地图分析](https://leetcode.cn/problems/as-far-from-land-as-possible/) | | 广度优先搜索、数组、动态规划、矩阵 | 中等 |
7+

Contents/08.Graph/04.Graph-Shortest-Path/06.Graph-Multi-Source-Shortest-Path.md

Whitespace-only changes.

Contents/08.Graph/04.Graph-Shortest-Path/07.Graph-Floyed.md

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
### 次短路径题目
2+
3+
| 题号 | 标题 | 题解 | 标签 | 难度 |
4+
| :------ | :------ | :------ | :------ | :------ |
5+
| 2045 | [到达目的地的第二短时间](https://leetcode.cn/problems/second-minimum-time-to-reach-destination/) | | 广度优先搜索、图、最短路 | 困难 |
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### 差分约束系统
2+
3+
| 题号 | 标题 | 题解 | 标签 | 难度 |
4+
| :------ | :------ | :------ | :------ | :------ |
5+
| 0995 | [K 连续位的最小翻转次数](https://leetcode.cn/problems/minimum-number-of-k-consecutive-bit-flips/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0995.%20K%20%E8%BF%9E%E7%BB%AD%E4%BD%8D%E7%9A%84%E6%9C%80%E5%B0%8F%E7%BF%BB%E8%BD%AC%E6%AC%A1%E6%95%B0.md) | 位运算、队列、数组、前缀和、滑动窗口 | 困难 |
6+
| 1109 | [航班预订统计](https://leetcode.cn/problems/corporate-flight-bookings/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/1109.%20%E8%88%AA%E7%8F%AD%E9%A2%84%E8%AE%A2%E7%BB%9F%E8%AE%A1.md) | 数组、前缀和 | 中等 |
7+

Contents/08.Graph/04.Graph-Shortest-Path/09.Graph-The-Second-Shortest-Path.md

Whitespace-only changes.

Contents/08.Graph/04.Graph-Shortest-Path/11.Graph-System-Of-Difference-Constraints.md

Whitespace-only changes.

Contents/index.md

+10-13
Original file line numberDiff line numberDiff line change
@@ -130,21 +130,18 @@
130130
- [图的拓扑排序知识](./08.Graph/02.Graph-Traversal/05.Graph-Topological-Sorting.md)
131131
- [图的拓扑排序题目](./08.Graph/02.Graph-Traversal/06.Graph-Topological-Sorting-List.md)
132132
- 图的生成树
133-
- [图的最小生成树](./08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
133+
- [图的最小生成树知识](./08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
134134
- [图的最小生成树题目](./08.Graph/03.Gaph-Spanning-Tree/02.Gaph-Minimum-Spanning-Tree-List.md)
135135
- 最短路径
136-
- [单源最短路径知识](./08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path.md)
137-
- [Dijkstra 算法](./08.Graph/04.Graph-Shortest-Path/02.Graph-Dijkstra.md)
138-
- [Bellman-Ford 算法](./08.Graph/04.Graph-Shortest-Path/03.Graph-Bellman-Ford.md)
139-
- [SPFA 算法](./08.Graph/04.Graph-Shortest-Path/04.Graph-SPFA.md)
140-
- [单源最短路径题目](./08.Graph/04.Graph-Shortest-Path/05.Graph-Single-Source-Shortest-Path-List.md)
141-
- [多源最短路径知识](./08.Graph/04.Graph-Shortest-Path/06.Graph-Multi-Source-Shortest-Path.md)
142-
- [Floyed 算法](./08.Graph/04.Graph-Shortest-Path/07.Graph-Floyed.md)
143-
- [多源最短路径题目](./08.Graph/04.Graph-Shortest-Path/08.Graph-Multi-Source-Shortest-Path-List.md)
144-
- [次短路径知识](./08.Graph/04.Graph-Shortest-Path/09.Graph-The-Second-Shortest-Path.md)
145-
- [次短路径题目](./08.Graph/04.Graph-Shortest-Path/10.Graph-The-Second-Shortest-Path-List.md)
146-
- [差分约束系统知识](./08.Graph/04.Graph-Shortest-Path/11.Graph-System-Of-Difference-Constraints.md)
147-
- [差分约束系统题目](./08.Graph/04.Graph-Shortest-Path/12.Graph-System-Of-Difference-Constraints-List.md)
136+
- [单源最短路径知识(一)](./08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path-01.md)
137+
- [单源最短路径知识(二)](./08.Graph/04.Graph-Shortest-Path/02.Graph-Single-Source-Shortest-Path-02.md)
138+
- [单源最短路径题目](./08.Graph/04.Graph-Shortest-Path/03.Graph-Single-Source-Shortest-Path-List.md)
139+
- [多源最短路径知识](./08.Graph/04.Graph-Shortest-Path/04.Graph-Multi-Source-Shortest-Path.md)
140+
- [多源最短路径题目](./08.Graph/04.Graph-Shortest-Path/05.Graph-Multi-Source-Shortest-Path-List.md)
141+
- [次短路径知识](./08.Graph/04.Graph-Shortest-Path/06.Graph-The-Second-Shortest-Path.md)
142+
- [次短路径题目](./08.Graph/04.Graph-Shortest-Path/07.Graph-The-Second-Shortest-Path-List.md)
143+
- [差分约束系统知识](./08.Graph/04.Graph-Shortest-Path/08.Graph-System-Of-Difference-Constraints.md)
144+
- [差分约束系统题目](./08.Graph/04.Graph-Shortest-Path/09.Graph-System-Of-Difference-Constraints-List.md)
148145
- 二分图
149146
- [二分图基础知识](./08.Graph/05.Graph-Bipartite/01.Graph-Bipartite-Basic.md)
150147
- [二分图基础题目](./08.Graph/05.Graph-Bipartite/02.Graph-Bipartite-Basic-List.md)

README.md

+10-13
Original file line numberDiff line numberDiff line change
@@ -169,21 +169,18 @@
169169
- [图的拓扑排序知识](./Contents/08.Graph/02.Graph-Traversal/05.Graph-Topological-Sorting.md)
170170
- [图的拓扑排序题目](./Contents/08.Graph/02.Graph-Traversal/06.Graph-Topological-Sorting-List.md)
171171
- 图的生成树
172-
- [图的最小生成树](./Contents/08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
172+
- [图的最小生成树知识](./Contents/08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
173173
- [图的最小生成树题目](./Contents/08.Graph/03.Gaph-Spanning-Tree/02.Gaph-Minimum-Spanning-Tree-List.md)
174174
- 最短路径
175-
- [单源最短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path.md)
176-
- [Dijkstra 算法](./Contents/08.Graph/04.Graph-Shortest-Path/02.Graph-Dijkstra.md)
177-
- [Bellman-Ford 算法](./Contents/08.Graph/04.Graph-Shortest-Path/03.Graph-Bellman-Ford.md)
178-
- [SPFA 算法](./Contents/08.Graph/04.Graph-Shortest-Path/04.Graph-SPFA.md)
179-
- [单源最短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/05.Graph-Single-Source-Shortest-Path-List.md)
180-
- [多源最短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/06.Graph-Multi-Source-Shortest-Path.md)
181-
- [Floyed 算法](./Contents/08.Graph/04.Graph-Shortest-Path/07.Graph-Floyed.md)
182-
- [多源最短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/08.Graph-Multi-Source-Shortest-Path-List.md)
183-
- [次短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/09.Graph-The-Second-Shortest-Path.md)
184-
- [次短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/10.Graph-The-Second-Shortest-Path-List.md)
185-
- [差分约束系统知识](./Contents/08.Graph/04.Graph-Shortest-Path/11.Graph-System-Of-Difference-Constraints.md)
186-
- [差分约束系统题目](./Contents/08.Graph/04.Graph-Shortest-Path/12.Graph-System-Of-Difference-Constraints-List.md)
175+
- [单源最短路径知识(一)](./Contents/08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path-01.md)
176+
- [单源最短路径知识(二)](./Contents/08.Graph/04.Graph-Shortest-Path/02.Graph-Single-Source-Shortest-Path-02.md)
177+
- [单源最短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/03.Graph-Single-Source-Shortest-Path-List.md)
178+
- [多源最短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/04.Graph-Multi-Source-Shortest-Path.md)
179+
- [多源最短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/05.Graph-Multi-Source-Shortest-Path-List.md)
180+
- [次短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/06.Graph-The-Second-Shortest-Path.md)
181+
- [次短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/07.Graph-The-Second-Shortest-Path-List.md)
182+
- [差分约束系统知识](./Contents/08.Graph/04.Graph-Shortest-Path/08.Graph-System-Of-Difference-Constraints.md)
183+
- [差分约束系统题目](./Contents/08.Graph/04.Graph-Shortest-Path/09.Graph-System-Of-Difference-Constraints-List.md)
187184
- 二分图
188185
- [二分图基础知识](./Contents/08.Graph/05.Graph-Bipartite/01.Graph-Bipartite-Basic.md)
189186
- [二分图基础题目](./Contents/08.Graph/05.Graph-Bipartite/02.Graph-Bipartite-Basic-List.md)

0 commit comments

Comments
 (0)