From dc1d8479e4d417279945dd780125395ccefeab5a Mon Sep 17 00:00:00 2001 From: chu fan Date: Mon, 16 Oct 2023 11:51:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E5=85=A5=E9=97=A8=E3=80=81=E7=BA=BF=E6=80=A7?= =?UTF-8?q?=E8=A1=A8=E3=80=81=E6=A0=88=E3=80=81=E9=98=9F=E5=88=97=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E5=9B=BA=E5=AE=9A=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/config/plugins.config.ts | 30 +++++++++--------- docs/.vuepress/styles/index.scss | 27 ---------------- docs/manuscripts/ds/ds.sidebar.ts | 18 +++++------ .../1.基本概念.md} | 8 +++++ .../2.三要素.md} | 7 ++++ .../3.算法和算法评价.md} | 8 +++++ .../basic_introduction.png | Bin .../readme.md | 0 .../ds/栈和队列/1.栈的基本概念和基本操作.md | 9 ++++-- .../ds/栈和队列/2.栈的顺序存储结构.md | 7 ++++ .../ds/栈和队列/3.栈的链式存储结构.md | 8 +++++ .../ds/栈和队列/4.队列的基本概念和操作.md | 8 +++++ .../ds/栈和队列/5.队列的顺序存储结构.md | 8 +++++ .../ds/栈和队列/6.队列的链式存储结构.md | 8 ++++- .../manuscripts/ds/栈和队列/7.栈VS队列补充.md | 7 ++++ .../1.基础概念和操作.md} | 12 +++++-- .../2.顺序表示.md} | 21 ++++++++---- .../3.链式表示.md} | 7 ++++ .../ds/{linear-table => 线性表}/4.总结.md | 8 +++++ .../ds/{linear-table => 线性表}/readme.md | 0 .../{linear-table => 线性表}/线性表_水印.png | Bin docs/readme.md | 2 +- 22 files changed, 139 insertions(+), 64 deletions(-) rename docs/manuscripts/ds/{basic-introduction/1.basic_concepts.md => 基础入门/1.基本概念.md} (93%) rename docs/manuscripts/ds/{basic-introduction/2.three_elements_of_data_structure.md => 基础入门/2.三要素.md} (95%) rename docs/manuscripts/ds/{basic-introduction/3.algorithm_and_algorithm_evaluation.md => 基础入门/3.算法和算法评价.md} (96%) rename docs/manuscripts/ds/{basic-introduction => 基础入门}/basic_introduction.png (100%) rename docs/manuscripts/ds/{basic-introduction => 基础入门}/readme.md (100%) rename docs/manuscripts/ds/{linear-table/1.basic_concept_and_operation.md => 线性表/1.基础概念和操作.md} (92%) rename docs/manuscripts/ds/{linear-table/2.sequential_representation.md => 线性表/2.顺序表示.md} (95%) rename docs/manuscripts/ds/{linear-table/3.chained_representation.md => 线性表/3.链式表示.md} (98%) rename docs/manuscripts/ds/{linear-table => 线性表}/4.总结.md (96%) rename docs/manuscripts/ds/{linear-table => 线性表}/readme.md (100%) rename docs/manuscripts/ds/{linear-table => 线性表}/线性表_水印.png (100%) diff --git a/docs/.vuepress/config/plugins.config.ts b/docs/.vuepress/config/plugins.config.ts index 16295af..a0393f8 100644 --- a/docs/.vuepress/config/plugins.config.ts +++ b/docs/.vuepress/config/plugins.config.ts @@ -14,21 +14,21 @@ export default { // HelloWorld: path.resolve(__dirname, '../components/HelloWorld.vue') // } }), - // searchProPlugin({ - // // 索引全部内容 - // indexContent: true, - // // 为分类和标签添加索引 - // customFields: [ - // { - // getter: (page: any) => page.frontmatter.category, - // formatter: "分类:$content", - // }, - // { - // getter: (page) => page.frontmatter.tag, - // formatter: "标签:$content", - // }, - // ], - // }), + searchProPlugin({ + // 索引全部内容 + indexContent: true, + // 为分类和标签添加索引 + customFields: [ + { + getter: (page: any) => page.frontmatter.category, + formatter: "分类:$content", + }, + { + getter: (page) => page.frontmatter.tag, + formatter: "标签:$content", + }, + ], + }), // // md文档增强 // mdEnhancePlugin({ // // 文件导入 diff --git a/docs/.vuepress/styles/index.scss b/docs/.vuepress/styles/index.scss index ae419e5..b4b1536 100644 --- a/docs/.vuepress/styles/index.scss +++ b/docs/.vuepress/styles/index.scss @@ -12,33 +12,6 @@ visibility: hidden; // 占位隐藏 } -.DocSearch-Button-Keys { - visibility: hidden -} - -// 首页title描述 -.home .hero .description { - max-width: fit-content; -} - -// 搜索框 -#docsearch-container > button { - border-radius: 5px; -} - -.code-group__nav-tab-active { - color: var(--c-brand) -} - -.open-info-div { - text-align: center; - align-content: center; - - a { - margin: 5px; - } -} - // 全站主题色 :root { diff --git a/docs/manuscripts/ds/ds.sidebar.ts b/docs/manuscripts/ds/ds.sidebar.ts index 2f137da..9b2c6b3 100644 --- a/docs/manuscripts/ds/ds.sidebar.ts +++ b/docs/manuscripts/ds/ds.sidebar.ts @@ -1,39 +1,39 @@ export const dsSidebar = [ { text: '基础入门', - prefix: 'basic-introduction', + prefix: '基础入门', collapsible: false, children: [ { text: '基本概念', - link: '1.basic_concepts.md' + link: '1.基本概念.md' }, { - text: '数据结构三要素', - link: '2.three_elements_of_data_structure.md' + text: '三要素', + link: '2.三要素.md' }, { text: '算法和算法评价', - link: '3.algorithm_and_algorithm_evaluation.md' + link: '3.算法和算法评价.md' } ] }, { text: '线性表', + prefix: '线性表', collapsible: false, - prefix: 'linear-table', children: [ { text: '基础概念和操作', - link: '1.basic_concept_and_operation.md' + link: '1.基础概念和操作.md' }, { text: '顺序表示', - link: '2.sequential_representation.md' + link: '2.顺序表示.md' }, { text: '链式表示', - link: '3.chained_representation.md' + link: '3.链式表示.md' }, { text: '一些总结', diff --git a/docs/manuscripts/ds/basic-introduction/1.basic_concepts.md b/docs/manuscripts/ds/基础入门/1.基本概念.md similarity index 93% rename from docs/manuscripts/ds/basic-introduction/1.basic_concepts.md rename to docs/manuscripts/ds/基础入门/1.基本概念.md index 1c9fc56..7357db7 100644 --- a/docs/manuscripts/ds/basic-introduction/1.basic_concepts.md +++ b/docs/manuscripts/ds/基础入门/1.基本概念.md @@ -1,3 +1,11 @@ +--- +title: 基础概念 +#description: +permalink: /manuscripts/ds/introduction-basic-concepts.html +head: + - [meta, { name: 数据结构 , content: 基础概念 }] +--- + # 基础概念 ```mindmap diff --git a/docs/manuscripts/ds/basic-introduction/2.three_elements_of_data_structure.md b/docs/manuscripts/ds/基础入门/2.三要素.md similarity index 95% rename from docs/manuscripts/ds/basic-introduction/2.three_elements_of_data_structure.md rename to docs/manuscripts/ds/基础入门/2.三要素.md index b69ed19..66e9c37 100644 --- a/docs/manuscripts/ds/basic-introduction/2.three_elements_of_data_structure.md +++ b/docs/manuscripts/ds/基础入门/2.三要素.md @@ -1,3 +1,10 @@ +--- +title: 数据结构三要素 +#description: +permalink: /manuscripts/ds/introduction-three-elements.html +head: + - [meta, { name: 数据结构 , content: 数据结构三要素 }] +--- # 数据结构三要素 diff --git a/docs/manuscripts/ds/basic-introduction/3.algorithm_and_algorithm_evaluation.md b/docs/manuscripts/ds/基础入门/3.算法和算法评价.md similarity index 96% rename from docs/manuscripts/ds/basic-introduction/3.algorithm_and_algorithm_evaluation.md rename to docs/manuscripts/ds/基础入门/3.算法和算法评价.md index 2f384a1..e3eda90 100644 --- a/docs/manuscripts/ds/basic-introduction/3.algorithm_and_algorithm_evaluation.md +++ b/docs/manuscripts/ds/基础入门/3.算法和算法评价.md @@ -1,3 +1,11 @@ +--- +title: 算法和算法评价 +#description: +permalink: /manuscripts/ds/introduction-algorithm-evaluation.html +head: + - [meta, { name: 数据结构 , content: 算法和算法评价 }] +--- + # 算法和算法评价 ```mindmap diff --git a/docs/manuscripts/ds/basic-introduction/basic_introduction.png b/docs/manuscripts/ds/基础入门/basic_introduction.png similarity index 100% rename from docs/manuscripts/ds/basic-introduction/basic_introduction.png rename to docs/manuscripts/ds/基础入门/basic_introduction.png diff --git a/docs/manuscripts/ds/basic-introduction/readme.md b/docs/manuscripts/ds/基础入门/readme.md similarity index 100% rename from docs/manuscripts/ds/basic-introduction/readme.md rename to docs/manuscripts/ds/基础入门/readme.md diff --git a/docs/manuscripts/ds/栈和队列/1.栈的基本概念和基本操作.md b/docs/manuscripts/ds/栈和队列/1.栈的基本概念和基本操作.md index ccf9a3f..e7dcf12 100644 --- a/docs/manuscripts/ds/栈和队列/1.栈的基本概念和基本操作.md +++ b/docs/manuscripts/ds/栈和队列/1.栈的基本概念和基本操作.md @@ -1,7 +1,12 @@ --- -permalink: /test +title: 算法和算法评价 +#description: +permalink: /manuscripts/ds/stack-basic-concepts.html +head: + - [meta, { name: 数据结构 , content: 栈的基本概念和基本操作 }] --- -# 基本概念和基本操作 + +# 栈的基本概念和基本操作 ## 基本概念 diff --git a/docs/manuscripts/ds/栈和队列/2.栈的顺序存储结构.md b/docs/manuscripts/ds/栈和队列/2.栈的顺序存储结构.md index 0535312..f49052e 100644 --- a/docs/manuscripts/ds/栈和队列/2.栈的顺序存储结构.md +++ b/docs/manuscripts/ds/栈和队列/2.栈的顺序存储结构.md @@ -1,3 +1,10 @@ +--- +title: 栈的顺序存储结构 +#description: +permalink: /manuscripts/ds/stack-sequential-storage.html +head: + - [meta, { name: 数据结构 , content: 栈的顺序存储结构 }] +--- # 栈的顺序存储结构 diff --git a/docs/manuscripts/ds/栈和队列/3.栈的链式存储结构.md b/docs/manuscripts/ds/栈和队列/3.栈的链式存储结构.md index c4bed53..8007d78 100644 --- a/docs/manuscripts/ds/栈和队列/3.栈的链式存储结构.md +++ b/docs/manuscripts/ds/栈和队列/3.栈的链式存储结构.md @@ -1,3 +1,11 @@ +--- +title: 栈的链式存储结构 +#description: +permalink: /manuscripts/ds/stack-chained-storage.html +head: + - [meta, { name: 数据结构 , content: 栈的链式存储结构 }] +--- + # 栈的链式存储结构 `链栈`: 采用链式存储的栈 diff --git a/docs/manuscripts/ds/栈和队列/4.队列的基本概念和操作.md b/docs/manuscripts/ds/栈和队列/4.队列的基本概念和操作.md index 61f9b6c..6a8caca 100644 --- a/docs/manuscripts/ds/栈和队列/4.队列的基本概念和操作.md +++ b/docs/manuscripts/ds/栈和队列/4.队列的基本概念和操作.md @@ -1,3 +1,11 @@ +--- +title: 队列的基本概念和操作 +#description: +permalink: /manuscripts/ds/queue-basic-concepts.html +head: + - [meta, { name: 数据结构 , content: 队列的基本概念和操作 }] +--- + # 队列的基本概念和操作 diff --git a/docs/manuscripts/ds/栈和队列/5.队列的顺序存储结构.md b/docs/manuscripts/ds/栈和队列/5.队列的顺序存储结构.md index abcdae7..f9f4751 100644 --- a/docs/manuscripts/ds/栈和队列/5.队列的顺序存储结构.md +++ b/docs/manuscripts/ds/栈和队列/5.队列的顺序存储结构.md @@ -1,3 +1,11 @@ +--- +title: 队列的顺序存储结构 +#description: +permalink: /manuscripts/ds/queue-sequential-storage.html +head: + - [meta, { name: 数据结构 , content: 队列的顺序存储结构 }] +--- + # 队列的顺序存储结构 diff --git a/docs/manuscripts/ds/栈和队列/6.队列的链式存储结构.md b/docs/manuscripts/ds/栈和队列/6.队列的链式存储结构.md index 660cb22..6562e27 100644 --- a/docs/manuscripts/ds/栈和队列/6.队列的链式存储结构.md +++ b/docs/manuscripts/ds/栈和队列/6.队列的链式存储结构.md @@ -1,4 +1,10 @@ - +--- +title: 队列的链式存储结构 +#description: +permalink: /manuscripts/ds/queue-chained-storage.html +head: +- [meta, { name: 数据结构 , content: 队列的链式存储结构 }] +--- # 队列的链式存储结构 `链队列`:和顺序队列一样,基于队列的链式表示叫做`链队列`,实际上为:**一个同时带有队头指针和队尾指针的单链表** diff --git a/docs/manuscripts/ds/栈和队列/7.栈VS队列补充.md b/docs/manuscripts/ds/栈和队列/7.栈VS队列补充.md index eac06bd..0bef967 100644 --- a/docs/manuscripts/ds/栈和队列/7.栈VS队列补充.md +++ b/docs/manuscripts/ds/栈和队列/7.栈VS队列补充.md @@ -1,3 +1,10 @@ +--- +title: 栈VS队列补充 +#description: +permalink: /manuscripts/ds/stack-vs-queue.html +head: + - [meta, { name: 数据结构 , content: 栈VS队列补充 }] +--- # 栈VS队列补充 diff --git a/docs/manuscripts/ds/linear-table/1.basic_concept_and_operation.md b/docs/manuscripts/ds/线性表/1.基础概念和操作.md similarity index 92% rename from docs/manuscripts/ds/linear-table/1.basic_concept_and_operation.md rename to docs/manuscripts/ds/线性表/1.基础概念和操作.md index 8b2d5bb..ca5b623 100644 --- a/docs/manuscripts/ds/linear-table/1.basic_concept_and_operation.md +++ b/docs/manuscripts/ds/线性表/1.基础概念和操作.md @@ -1,3 +1,11 @@ +--- +title: 基础概念 +#description: +permalink: /manuscripts/ds/linear-table-basic-concepts.html +head: + - [meta, { name: 数据结构 , content: 线性表的基础概念和操作 }] +--- + # 线性表的基础概念和操作 > 强调线性表是一种逻辑结构,不是存储结构 @@ -15,7 +23,7 @@ root(数据结构三要素) ``` -### 定义 +## 定义 线性表是具有相同数据类型的n(n≥0)个数据元素的有限序列。一般表示: @@ -44,7 +52,7 @@ L=(a1,a2,a3......an) 其中n可以 -### 基本操作 +## 基本操作 - `InitList(&L)`: **初始化表**。构造空的线性表 - `Length(L)`:**获取表的长度**。返回线性表L的长度,即表中的数据元素个数 diff --git a/docs/manuscripts/ds/linear-table/2.sequential_representation.md b/docs/manuscripts/ds/线性表/2.顺序表示.md similarity index 95% rename from docs/manuscripts/ds/linear-table/2.sequential_representation.md rename to docs/manuscripts/ds/线性表/2.顺序表示.md index 9b0f6c3..4a52ef6 100644 --- a/docs/manuscripts/ds/linear-table/2.sequential_representation.md +++ b/docs/manuscripts/ds/线性表/2.顺序表示.md @@ -1,3 +1,10 @@ +--- +title: 顺序表示 +#description: +permalink: /manuscripts/ds/linear-table-sequential-representation.html +head: + - [meta, { name: 数据结构 , content: 线性表的顺序表示 }] +--- # 线性表的顺序表示 @@ -12,7 +19,7 @@ root(数据结构三要素) 数据的运算 ``` -### 定义 +## 定义 `顺序表`:顺序存储的线性表,**是用一组地址连续的存储单元,依次存储线性表中的数据元素,使得在逻辑上相邻的两个元素在物理位置上也相邻。** @@ -41,7 +48,7 @@ typedef struct{ ``` -#### 存储分配 +### 存储分配 `静态分配`:数组的大小和空间都是实现确定好的,一旦存储空间占满就会产生溢出,直接导致程序崩溃。(有点内存不够,宕机重启的意思....) @@ -80,7 +87,7 @@ L.data=new ElemType[InitSize]; **动态分配不是链式存储,而是属于顺序存储结构**,动态分配的物理结构没有改变,依然是随机存取的方式。只是分配的空间大小可以在运行时决定; -#### 顺序表的特点 +### 顺序表的特点 - 随机访问【这是最主要的特点】,通过存储起始地址和元素序号O(1)时间内访问指定元素。 @@ -91,10 +98,10 @@ L.data=new ElemType[InitSize]; -### 基本操作 +## 基本操作 -#### 插入 +### 插入 在顺序表L的第i(1≤i≤L.length+1)个位置插入新的元素e @@ -154,7 +161,7 @@ bool ListInsert(SqList &L, int i, ElemType e){ > Tips: 需要根据实现代码理解循环为什么是从后往前来实现元素后移,通过for循环可以很明显的看出表尾插入快,表头插入慢 -#### 删除 +### 删除 删除顺序表L中第i(1≤i≤L.length+1)个位置的元素 @@ -216,7 +223,7 @@ bool ListDelete(SqList &L, int i, ElemType &e){ **线性表删除算法的平均时间复杂度为O(n);** -#### 按值查找(顺序查找) +### 按值查找(顺序查找) 在顺序表L中查找第一个元素值等于e的元素,并返回位序 diff --git a/docs/manuscripts/ds/linear-table/3.chained_representation.md b/docs/manuscripts/ds/线性表/3.链式表示.md similarity index 98% rename from docs/manuscripts/ds/linear-table/3.chained_representation.md rename to docs/manuscripts/ds/线性表/3.链式表示.md index a64e27f..e06ba17 100644 --- a/docs/manuscripts/ds/linear-table/3.chained_representation.md +++ b/docs/manuscripts/ds/线性表/3.链式表示.md @@ -1,3 +1,10 @@ +--- +title: 链式表示 +#description: +permalink: /manuscripts/ds/linear-table-chained-representation.html +head: + - [meta, { name: 数据结构 , content: 线性表的链式表示 }] +--- # 链式表示 ```mindmap diff --git a/docs/manuscripts/ds/linear-table/4.总结.md b/docs/manuscripts/ds/线性表/4.总结.md similarity index 96% rename from docs/manuscripts/ds/linear-table/4.总结.md rename to docs/manuscripts/ds/线性表/4.总结.md index cd3f316..801ef81 100644 --- a/docs/manuscripts/ds/linear-table/4.总结.md +++ b/docs/manuscripts/ds/线性表/4.总结.md @@ -1,3 +1,11 @@ +--- +title: 链式表示 +#description: +permalink: /manuscripts/ds/linear-table-summary.html +head: + - [meta, { name: 数据结构 , content: 线性表总结 }] +--- + # 线性表总结 ```mindmap diff --git a/docs/manuscripts/ds/linear-table/readme.md b/docs/manuscripts/ds/线性表/readme.md similarity index 100% rename from docs/manuscripts/ds/linear-table/readme.md rename to docs/manuscripts/ds/线性表/readme.md diff --git a/docs/manuscripts/ds/linear-table/线性表_水印.png b/docs/manuscripts/ds/线性表/线性表_水印.png similarity index 100% rename from docs/manuscripts/ds/linear-table/线性表_水印.png rename to docs/manuscripts/ds/线性表/线性表_水印.png diff --git a/docs/readme.md b/docs/readme.md index 70a9e02..ffdeddc 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -2,7 +2,7 @@ home: true title: 首页 heroText: 计算机应试全家桶 -tagline: 保持终身学习,读研or考研,做适合自己的选择 +tagline: 保持终身学习,读研or考研,做适合自己的选择! actions: - text: 快速开始→ link: /quick-start.md