Skip to content

Commit

Permalink
更新章节目录链接
Browse files Browse the repository at this point in the history
  • Loading branch information
itcharge committed Aug 14, 2023
1 parent c7d9baa commit e607a79
Show file tree
Hide file tree
Showing 16 changed files with 113 additions and 39 deletions.
23 changes: 10 additions & 13 deletions Assets/Origins/README-Catalogue-List.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,18 @@
- [图的拓扑排序知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/02.Graph-Traversal/05.Graph-Topological-Sorting.md)
- [图的拓扑排序题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/02.Graph-Traversal/06.Graph-Topological-Sorting-List.md)
- 图的生成树
- [图的最小生成树](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
- [图的最小生成树知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
- [图的最小生成树题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/03.Gaph-Spanning-Tree/02.Gaph-Minimum-Spanning-Tree-List.md)
- 最短路径
- [单源最短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path.md)
- [Dijkstra 算法](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/02.Graph-Dijkstra.md)
- [Bellman-Ford 算法](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/03.Graph-Bellman-Ford.md)
- [SPFA 算法](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/04.Graph-SPFA.md)
- [单源最短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/05.Graph-Single-Source-Shortest-Path-List.md)
- [多源最短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/06.Graph-Multi-Source-Shortest-Path.md)
- [Floyed 算法](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/07.Graph-Floyed.md)
- [多源最短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/08.Graph-Multi-Source-Shortest-Path-List.md)
- [次短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/09.Graph-The-Second-Shortest-Path.md)
- [次短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/10.Graph-The-Second-Shortest-Path-List.md)
- [差分约束系统知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/11.Graph-System-Of-Difference-Constraints.md)
- [差分约束系统题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/12.Graph-System-Of-Difference-Constraints-List.md)
- [单源最短路径知识(一)](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path-01.md)
- [单源最短路径知识(二)](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/02.Graph-Single-Source-Shortest-Path-02.md)
- [单源最短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/03.Graph-Single-Source-Shortest-Path-List.md)
- [多源最短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/04.Graph-Multi-Source-Shortest-Path.md)
- [多源最短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/05.Graph-Multi-Source-Shortest-Path-List.md)
- [次短路径知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/06.Graph-The-Second-Shortest-Path.md)
- [次短路径题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/07.Graph-The-Second-Shortest-Path-List.md)
- [差分约束系统知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/08.Graph-System-Of-Difference-Constraints.md)
- [差分约束系统题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/04.Graph-Shortest-Path/09.Graph-System-Of-Difference-Constraints-List.md)
- 二分图
- [二分图基础知识](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/05.Graph-Bipartite/01.Graph-Bipartite-Basic.md)
- [二分图基础题目](https://github.com/itcharge/LeetCode-Py/blob/main/Contents/08.Graph/05.Graph-Bipartite/02.Graph-Bipartite-Basic-List.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## 1. 单源最短路径的定义

> **单源最短路径(Single Source Shortest Path)**:对于一个带权图 $G = (V, E)$,其中每条边的权重是一个实数。另外,给定 $v$ 中的一个顶点,称之为源点。则源点到其他所有各个顶点之间的最短路径长度,称为单源最短路径。
这里的路径长度,指的是路径上各边权之和。

单源最短路径问题的核心是找到从源点到其他各个顶点的路径,使得路径上边的权重之和最小。这个问题在许多实际应用中都非常重要,比如网络路由、地图导航、通信网络优化等。

常见的解决单源最短路径问题的算法包括:

1. **Dijkstra 算法**:一种贪心算法,用于解决无负权边的情况。它逐步扩展当前已知最短路径的范围,选择当前距离起始节点最近的节点,并更新与该节点相邻的节点的距离。
2. **Bellman-Ford 算法**:适用于有负权边的情况。它通过多次迭代来逐步逼近最短路径,每次迭代都尝试通过更新边的权重来缩短路径。
3. **SPFA 算法**:优化的 Bellman-Ford 算法,它在每次迭代中不遍历所有的边,而是选择性地更新与当前节点相关的边,从而提高了算法的效率。

这些算法根据图的特点和问题的需求有所不同,选择适合的算法可以在不同情况下有效地解决单源最短路径问题。

## 2. Dijkstra 算法

### 2.1 Dijkstra 算法的算法思想

> **Dijkstra 算法的算法思想**:通过逐步选择距离起始节点最近的节点,并根据这些节点的路径更新其他节点的距离,从而逐步找到最短路径。
### 2.2 Dijkstra 算法的实现步骤

### 2.3 Dijkstra 算法的实现代码

```Python

```

## 3. Bellman-Ford 算法

### 3.1 Bellman-Ford 算法的算法思想

### 3.2 Bellman-Ford 算法的实现步骤

### 3.3 Bellman-Ford 算法的实现代码

```Python

```

## 4. SPFA 算法

### 4.1 SPFA 算法的算法思想

### 4.2 SPFA 算法的实现步骤

### 4.3 SPFA 算法的实现代码

```Python
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### 单源最短路径题目

| 题号 | 标题 | 题解 | 标签 | 难度 |
| :------ | :------ | :------ | :------ | :------ |
| 0407 | [接雨水 II](https://leetcode.cn/problems/trapping-rain-water-ii/) | | 广度优先搜索、数组、矩阵、堆(优先队列) | 困难 |
| 0743 | [网络延迟时间](https://leetcode.cn/problems/network-delay-time/) | | 深度优先搜索、广度优先搜索、图、最短路、堆(优先队列) | 中等 |
| 0787 | [K 站中转内最便宜的航班](https://leetcode.cn/problems/cheapest-flights-within-k-stops/) | | 深度优先搜索、广度优先搜索、图、动态规划、最短路、堆(优先队列) | 中等 |
| 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) | 深度优先搜索、广度优先搜索、并查集、数组、二分查找、矩阵、堆(优先队列) | 中等 |
| 1786 | [从第一个节点出发到最后一个节点的受限路径数](https://leetcode.cn/problems/number-of-restricted-paths-from-first-to-last-node/) | | 图、拓扑排序、动态规划、最短路、堆(优先队列) | 中等 |

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### 多源最短路径题目

| 题号 | 标题 | 题解 | 标签 | 难度 |
| :------ | :------ | :------ | :------ | :------ |
| 0815 | [公交路线](https://leetcode.cn/problems/bus-routes/) | | 广度优先搜索、数组、哈希表 | 困难 |
| 1162 | [地图分析](https://leetcode.cn/problems/as-far-from-land-as-possible/) | | 广度优先搜索、数组、动态规划、矩阵 | 中等 |

Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### 次短路径题目

| 题号 | 标题 | 题解 | 标签 | 难度 |
| :------ | :------ | :------ | :------ | :------ |
| 2045 | [到达目的地的第二短时间](https://leetcode.cn/problems/second-minimum-time-to-reach-destination/) | | 广度优先搜索、图、最短路 | 困难 |

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### 差分约束系统

| 题号 | 标题 | 题解 | 标签 | 难度 |
| :------ | :------ | :------ | :------ | :------ |
| 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) | 位运算、队列、数组、前缀和、滑动窗口 | 困难 |
| 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) | 数组、前缀和 | 中等 |

Empty file.
Empty file.
23 changes: 10 additions & 13 deletions Contents/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,18 @@
- [图的拓扑排序知识](./08.Graph/02.Graph-Traversal/05.Graph-Topological-Sorting.md)
- [图的拓扑排序题目](./08.Graph/02.Graph-Traversal/06.Graph-Topological-Sorting-List.md)
- 图的生成树
- [图的最小生成树](./08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
- [图的最小生成树知识](./08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
- [图的最小生成树题目](./08.Graph/03.Gaph-Spanning-Tree/02.Gaph-Minimum-Spanning-Tree-List.md)
- 最短路径
- [单源最短路径知识](./08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path.md)
- [Dijkstra 算法](./08.Graph/04.Graph-Shortest-Path/02.Graph-Dijkstra.md)
- [Bellman-Ford 算法](./08.Graph/04.Graph-Shortest-Path/03.Graph-Bellman-Ford.md)
- [SPFA 算法](./08.Graph/04.Graph-Shortest-Path/04.Graph-SPFA.md)
- [单源最短路径题目](./08.Graph/04.Graph-Shortest-Path/05.Graph-Single-Source-Shortest-Path-List.md)
- [多源最短路径知识](./08.Graph/04.Graph-Shortest-Path/06.Graph-Multi-Source-Shortest-Path.md)
- [Floyed 算法](./08.Graph/04.Graph-Shortest-Path/07.Graph-Floyed.md)
- [多源最短路径题目](./08.Graph/04.Graph-Shortest-Path/08.Graph-Multi-Source-Shortest-Path-List.md)
- [次短路径知识](./08.Graph/04.Graph-Shortest-Path/09.Graph-The-Second-Shortest-Path.md)
- [次短路径题目](./08.Graph/04.Graph-Shortest-Path/10.Graph-The-Second-Shortest-Path-List.md)
- [差分约束系统知识](./08.Graph/04.Graph-Shortest-Path/11.Graph-System-Of-Difference-Constraints.md)
- [差分约束系统题目](./08.Graph/04.Graph-Shortest-Path/12.Graph-System-Of-Difference-Constraints-List.md)
- [单源最短路径知识(一)](./08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path-01.md)
- [单源最短路径知识(二)](./08.Graph/04.Graph-Shortest-Path/02.Graph-Single-Source-Shortest-Path-02.md)
- [单源最短路径题目](./08.Graph/04.Graph-Shortest-Path/03.Graph-Single-Source-Shortest-Path-List.md)
- [多源最短路径知识](./08.Graph/04.Graph-Shortest-Path/04.Graph-Multi-Source-Shortest-Path.md)
- [多源最短路径题目](./08.Graph/04.Graph-Shortest-Path/05.Graph-Multi-Source-Shortest-Path-List.md)
- [次短路径知识](./08.Graph/04.Graph-Shortest-Path/06.Graph-The-Second-Shortest-Path.md)
- [次短路径题目](./08.Graph/04.Graph-Shortest-Path/07.Graph-The-Second-Shortest-Path-List.md)
- [差分约束系统知识](./08.Graph/04.Graph-Shortest-Path/08.Graph-System-Of-Difference-Constraints.md)
- [差分约束系统题目](./08.Graph/04.Graph-Shortest-Path/09.Graph-System-Of-Difference-Constraints-List.md)
- 二分图
- [二分图基础知识](./08.Graph/05.Graph-Bipartite/01.Graph-Bipartite-Basic.md)
- [二分图基础题目](./08.Graph/05.Graph-Bipartite/02.Graph-Bipartite-Basic-List.md)
Expand Down
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,18 @@
- [图的拓扑排序知识](./Contents/08.Graph/02.Graph-Traversal/05.Graph-Topological-Sorting.md)
- [图的拓扑排序题目](./Contents/08.Graph/02.Graph-Traversal/06.Graph-Topological-Sorting-List.md)
- 图的生成树
- [图的最小生成树](./Contents/08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
- [图的最小生成树知识](./Contents/08.Graph/03.Gaph-Spanning-Tree/01.Gaph-Minimum-Spanning-Tree.md)
- [图的最小生成树题目](./Contents/08.Graph/03.Gaph-Spanning-Tree/02.Gaph-Minimum-Spanning-Tree-List.md)
- 最短路径
- [单源最短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path.md)
- [Dijkstra 算法](./Contents/08.Graph/04.Graph-Shortest-Path/02.Graph-Dijkstra.md)
- [Bellman-Ford 算法](./Contents/08.Graph/04.Graph-Shortest-Path/03.Graph-Bellman-Ford.md)
- [SPFA 算法](./Contents/08.Graph/04.Graph-Shortest-Path/04.Graph-SPFA.md)
- [单源最短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/05.Graph-Single-Source-Shortest-Path-List.md)
- [多源最短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/06.Graph-Multi-Source-Shortest-Path.md)
- [Floyed 算法](./Contents/08.Graph/04.Graph-Shortest-Path/07.Graph-Floyed.md)
- [多源最短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/08.Graph-Multi-Source-Shortest-Path-List.md)
- [次短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/09.Graph-The-Second-Shortest-Path.md)
- [次短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/10.Graph-The-Second-Shortest-Path-List.md)
- [差分约束系统知识](./Contents/08.Graph/04.Graph-Shortest-Path/11.Graph-System-Of-Difference-Constraints.md)
- [差分约束系统题目](./Contents/08.Graph/04.Graph-Shortest-Path/12.Graph-System-Of-Difference-Constraints-List.md)
- [单源最短路径知识(一)](./Contents/08.Graph/04.Graph-Shortest-Path/01.Graph-Single-Source-Shortest-Path-01.md)
- [单源最短路径知识(二)](./Contents/08.Graph/04.Graph-Shortest-Path/02.Graph-Single-Source-Shortest-Path-02.md)
- [单源最短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/03.Graph-Single-Source-Shortest-Path-List.md)
- [多源最短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/04.Graph-Multi-Source-Shortest-Path.md)
- [多源最短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/05.Graph-Multi-Source-Shortest-Path-List.md)
- [次短路径知识](./Contents/08.Graph/04.Graph-Shortest-Path/06.Graph-The-Second-Shortest-Path.md)
- [次短路径题目](./Contents/08.Graph/04.Graph-Shortest-Path/07.Graph-The-Second-Shortest-Path-List.md)
- [差分约束系统知识](./Contents/08.Graph/04.Graph-Shortest-Path/08.Graph-System-Of-Difference-Constraints.md)
- [差分约束系统题目](./Contents/08.Graph/04.Graph-Shortest-Path/09.Graph-System-Of-Difference-Constraints-List.md)
- 二分图
- [二分图基础知识](./Contents/08.Graph/05.Graph-Bipartite/01.Graph-Bipartite-Basic.md)
- [二分图基础题目](./Contents/08.Graph/05.Graph-Bipartite/02.Graph-Bipartite-Basic-List.md)
Expand Down

0 comments on commit e607a79

Please sign in to comment.