Skip to content

Commit 615da29

Browse files
docs: Update dsa-ds: arrry
1 parent bd8151a commit 615da29

File tree

4 files changed

+67
-24
lines changed

4 files changed

+67
-24
lines changed
18 KB
Loading

docs/notes/dsa/ds/linear/array.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# 顺序表
2+
3+
## 定义
4+
5+
顺序表(*Sequence List*),即线性表的顺序存储结构,用一组地址**连续的存储单元**依次存储线性表中的数据元素,从而使得逻辑上相邻的两个元素在物理位置上也相邻,==通常基于**数组**实现==。
6+
7+
![数组](../../../assets/dsa.assets/ds/linear/array/array_definition.png)
8+
*图片来源:[数组 | Hello 算法](https://www.hello-algo.com/chapter_array_and_linkedlist/array/)*
9+
10+
!!! important "数组 vs 顺序表"
11+
**数组(*Array***
12+
13+
- 更倾向于一个**具象且底层**的概念,==是物理存储结构==,几乎是每一个高级编程语言中**原生**的数据结构(包括底层的 C)
14+
15+
- 各个编程语言的封装有所差异,概念上往往**只关注储存和索引**
16+
17+
**顺序表(*Sequence List*)**:
18+
19+
- 偏**抽象**一些,==是**抽象数据类型/逻辑结构**==
20+
21+
- **在数据结构中**是一个通用的概念,通常封装一些基本操作(如动态扩容、插入、删除等)
22+
23+
==顺序表在本质上可看作是数组,其“顺序存储”的特性在编程语言中通常基于数组实现==,故二者的数据结构特征基本相同:如连续存储、随机访问(时间复杂度为 $O(1)$)等;因此二者在大多数情况下都可理解为同一个东西。
24+
25+
!!! tip
26+
- 数据结构首先是[**抽象数据类型(*ADT***](https://www.geeksforgeeks.org/dsa/abstract-data-types/){target="_blank"}:定义元素组织、操作集合与复杂度;其实现依语言选取(数组/链表/哈希/树等),同一 ADT 可有多种实现与权衡。
27+
28+
- 编程语言与数据结构中的某些概念之间具有一些微妙的关系。无论是上面提到的顺序表还是后面的各种线性表(如栈、队列等),其在数据结构中的概念都是**抽象的逻辑结构**,在实际应用中都需要基于不同编程语言中对应的封装来实现,理解二者之间的区别与联系对于进一步理解数据结构的抽象概念是学习过程中可能会遭遇到的重难点。
29+
30+
## 常用操作
31+
32+
### 初始化
33+
34+
<div style="text-align: center;">
35+
🚧前方施工中🚧
36+
</div>

docs/notes/index.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,30 @@ comments: true
2424

2525
=== "中文"
2626
**学者应当遵循之物, 唯有知论与证辩。只有时刻保持对一切的质疑,才能避免陷入偏见。**
27-
27+
28+
29+
## Recent Notes
30+
31+
=== "English"
32+
33+
=== "中文"
34+
35+
<!-- recent_notes_start -->
36+
<ul>
37+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="dsa/ds/linear/array/">顺序表</a><span style="font-size:0.8em;">2025-08-21</span></div></li>
38+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="dsa/anal/space/">算法空间复杂度</a><span style="font-size:0.8em;">2025-08-21</span></div></li>
39+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="dsa/anal/time/">算法时间复杂度</a><span style="font-size:0.8em;">2025-08-20</span></div></li>
40+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="dsa/anal/iter_and_recu/">迭代与递归</a><span style="font-size:0.8em;">2025-08-15</span></div></li>
41+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="tools/git/">Git</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
42+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="tools/linux/tmux/">tmux</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
43+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="language/c++/C++ Fundamental/11-smart_pointer-RAII/">RAII 和智能指针</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
44+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="language/c++/C++ Fundamental/05-classes-template/">类与模板</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
45+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="language/c++/C++ Fundamental/04-iterators-pointers/">迭代器和指针</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
46+
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="dsa/ds/intro/">结构分类与基本数据类型</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
47+
</ul>
48+
<!-- recent_notes_end -->
49+
50+
2851
## About Me
2952

3053
=== "English"
@@ -67,28 +90,6 @@ comments: true
6790

6891
欢迎在评论区留下你的见解,如果它有价值,我将感激不尽。
6992

70-
## Recent Notes
71-
72-
=== "English"
73-
74-
=== "中文"
75-
76-
<!-- recent_notes_start -->
77-
<ul>
78-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="dsa/anal/space/">算法空间复杂度</a><span style="font-size:0.8em;">2025-08-21</span></div></li>
79-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="dsa/anal/time/">算法时间复杂度</a><span style="font-size:0.8em;">2025-08-20</span></div></li>
80-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="dsa/anal/iter_and_recu/">迭代与递归</a><span style="font-size:0.8em;">2025-08-15</span></div></li>
81-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="tools/git/">Git</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
82-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="tools/linux/tmux/">tmux</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
83-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="language/c++/C++ Fundamental/11-smart_pointer-RAII/">RAII 和智能指针</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
84-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="language/c++/C++ Fundamental/05-classes-template/">类与模板</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
85-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="language/c++/C++ Fundamental/04-iterators-pointers/">迭代器和指针</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
86-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="dsa/ds/intro/">结构分类与基本数据类型</a><span style="font-size:0.8em;">2025-08-13</span></div></li>
87-
<li><div style="display:flex; justify-content:space-between; align-items:center;"><a href="math/discrete/proof/">证明</a><span style="font-size:0.8em;">2025-08-11</span></div></li>
88-
</ul>
89-
<!-- recent_notes_end -->
90-
91-
9293
## Learning Outcomes
9394

9495
=== "English"

mkdocs.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,13 @@ nav:
276276
- 空间复杂度: "notes/dsa/anal/space.md"
277277
- 数据结构:
278278
- 结构分类与基本数据类型: "notes/dsa/ds/intro.md"
279-
# - 线性表:
279+
- 线性表:
280+
- 顺序表: "notes/dsa/ds/linear/array.md"
281+
# [ ] - 链表: "notes/dsa/ds/linear/linked-list.md"
282+
# [ ] - 栈: "notes/dsa/ds/linear/stack.md"
283+
# [ ] - 队列: "notes/dsa/ds/linear/queue.md"
284+
# [ ] - 双端队列: "notes/dsa/ds/linear/deque.md"
285+
# [ ] - 循环队列: "notes/dsa/ds/linear/circular-queue.md"
280286
# - 算法:
281287
# - 软件工程:
282288
# - note/software-engineering/

0 commit comments

Comments
 (0)