Skip to content

Commit 6e85490

Browse files
committed
修复内容显示问题
1 parent 99f91b2 commit 6e85490

File tree

22 files changed

+34
-25
lines changed

22 files changed

+34
-25
lines changed

codes/python/08_dynamic_programming/Digit-DP.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ def digitDP(self, n: int) -> int:
66
# pos: 第 pos 个数位
77
# state: 之前选过的数字集合。
88
# isLimit: 表示是否受到选择限制。如果为真,则第 pos 位填入数字最多为 s[pos];如果为假,则最大可为 9。
9-
# isNum: 表示 pos 前面的数位是否填了数字。如果为真,则当前位不可跳过;如果为假,则当前位可跳过。
9+
# isNum: 表示 pos 前面的数位是否填了数字。
10+
# 如果为真,则当前位不可跳过;如果为假,则当前位可跳过。
1011
def dfs(pos, state, isLimit, isNum):
1112
if pos == len(s):
1213
# isNum 为 True,则表示当前方案符合要求

docs/00_preface/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![](https://qcdn.itcharge.cn/images/20250923152426.png)
22

33
::: tip 引 言
4+
45
数据结构如同星辰,算法宛若清风,星光与微风交织,点亮智慧的夜空。
56

67
愿本书与你同行,助你轻装前行,照亮属于你的算法之路。

docs/01_array/01_02_array_sort.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# 1.2 数组排序
2-
31
数组排序是计算机科学中最基本的问题之一。排序算法有很多种,每种算法都有其特点和适用场景。
42

53
## 1. 排序算法的分类

docs/01_array/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![](https://qcdn.itcharge.cn/images/20250923140234.png)
22

33
::: tip 引 言
4+
45
数组如同连续砖块砌成的墙。
56

67
每一块砖石紧密相依,井然有序,宛如时光的流转,悄然记录着数据的点滴。

docs/02_linked_list/02_07_linked_list_quick_sort.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ class Solution:
8585

8686
| 指标 | 复杂度 | 说明 |
8787
|------|--------|------|
88-
| **最佳时间复杂度** | $O(n \\log n)$ | 每次等分为两半,递归层数约 $\\log n$ |
88+
| **最佳时间复杂度** | $O(n \log n)$ | 每次等分为两半,递归层数约 $\log n$ |
8989
| **最坏时间复杂度** | $O(n^2)$ | 已有序/逆序或重复值多,划分极端不均 |
90-
| **平均时间复杂度** | $O(n \\log n)$ | 期望情况下划分较均匀 |
91-
| **空间复杂度** | $O(\\log n)$ | 递归调用栈深度(原地就地分区,无额外数组) |
90+
| **平均时间复杂度** | $O(n \log n)$ | 期望情况下划分较均匀 |
91+
| **空间复杂度** | $O(\log n)$ | 递归调用栈深度(原地就地分区,无额外数组) |
9292
| **稳定性** | ❌ 不稳定 | 相等节点的相对顺序可能改变 |
9393

9494
## 4. 总结
9595

9696
链表快速排序通过分治与就地分区实现排序,平均效率高,但极端情况下退化明显,且不稳定。
9797

98-
**优点**:平均时间复杂度 $O(n\\log n)$,就地分区、空间开销小
98+
**优点**:平均时间复杂度 $O(n\log n)$,就地分区、空间开销小
9999
**缺点**:最坏时间复杂度 $O(n^2)$,不稳定,对枢轴选择敏感
100100

101101
## 练习题目

docs/02_linked_list/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![](https://qcdn.itcharge.cn/images/20250923140251.png)
22

33
::: tip 引 言
4+
45
链表如同夜空中串联的星星。
56

67
节点相连,如繁星串珠,静静铺展成一条灵动的数据长河。

docs/03_stack_queue_hash_table/03_05_bidirectional_queue.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
- **查看队头元素(peek_front)**:查看队头元素但不删除
2929
- **查看队尾元素(peek_back)**:查看队尾元素但不删除
3030

31-
下图展示了双向队列的结构和操作方式:
32-
33-
![双向队列结构](https://qcdn.itcharge.cn/images/202405092300123.png)
3431

3532
## 2. 双向队列的实现方式
3633

@@ -42,8 +39,6 @@
4239

4340
#### 2.1.1 链式存储双向队列的基本描述
4441

45-
![链式存储双向队列](https://qcdn.itcharge.cn/images/202405092300456.png)
46-
4742
我们使用双向链表实现双向队列:
4843

4944
- **节点结构**:每个节点包含数据域和两个指针域(prev 和 next)
@@ -144,7 +139,6 @@ class Deque:
144139

145140
#### 2.2.1 顺序存储双向队列的基本描述
146141

147-
![顺序存储双向队列](https://qcdn.itcharge.cn/images/202405092301234.png)
148142

149143
使用循环数组实现双向队列:
150144

docs/03_stack_queue_hash_table/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![](https://qcdn.itcharge.cn/images/20250923140308.png)
22

33
::: tip 引 言
4+
45
栈如杯中叠盘,盘盘相扣,取放皆自上,后进先出。
56

67
队列如河中行舟,前舟先行,后舟继发,川流不息。

docs/04_string/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
![](https://qcdn.itcharge.cn/images/20250923140327.png)
22

33
::: tip 引 言
4+
45
字符串如同夜色中流淌的音符。
56

67
如清风拂过琴弦,谱写数据的旋律与梦想。

docs/05_tree/05_05_segment_tree_01.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
下图展示了区间 $[0, 7]$ 的线段树结构:
1010

11-
![区间 [0, 7] 对应的线段树](https://qcdn.itcharge.cn/images/20240511173328.png)
11+
![线段树结构](https://qcdn.itcharge.cn/images/20240511173328.png)
1212

1313
### 1.2 线段树的特点
1414

0 commit comments

Comments
 (0)