diff --git a/docs/.vuepress/config/plugins.config.ts b/docs/.vuepress/config/plugins.config.ts index 16295afd..a0393f8f 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 ae419e5a..b4b1536f 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 2f137da1..9b2c6b3c 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/\345\237\272\347\241\200\345\205\245\351\227\250/1.\345\237\272\346\234\254\346\246\202\345\277\265.md" similarity index 93% rename from docs/manuscripts/ds/basic-introduction/1.basic_concepts.md rename to "docs/manuscripts/ds/\345\237\272\347\241\200\345\205\245\351\227\250/1.\345\237\272\346\234\254\346\246\202\345\277\265.md" index 1c9fc569..7357db7b 100644 --- a/docs/manuscripts/ds/basic-introduction/1.basic_concepts.md +++ "b/docs/manuscripts/ds/\345\237\272\347\241\200\345\205\245\351\227\250/1.\345\237\272\346\234\254\346\246\202\345\277\265.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/\345\237\272\347\241\200\345\205\245\351\227\250/2.\344\270\211\350\246\201\347\264\240.md" similarity index 95% rename from docs/manuscripts/ds/basic-introduction/2.three_elements_of_data_structure.md rename to "docs/manuscripts/ds/\345\237\272\347\241\200\345\205\245\351\227\250/2.\344\270\211\350\246\201\347\264\240.md" index b69ed199..66e9c376 100644 --- a/docs/manuscripts/ds/basic-introduction/2.three_elements_of_data_structure.md +++ "b/docs/manuscripts/ds/\345\237\272\347\241\200\345\205\245\351\227\250/2.\344\270\211\350\246\201\347\264\240.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/\345\237\272\347\241\200\345\205\245\351\227\250/3.\347\256\227\346\263\225\345\222\214\347\256\227\346\263\225\350\257\204\344\273\267.md" similarity index 95% rename from docs/manuscripts/ds/basic-introduction/3.algorithm_and_algorithm_evaluation.md rename to "docs/manuscripts/ds/\345\237\272\347\241\200\345\205\245\351\227\250/3.\347\256\227\346\263\225\345\222\214\347\256\227\346\263\225\350\257\204\344\273\267.md" index 2f384a19..e3eda902 100644 --- a/docs/manuscripts/ds/basic-introduction/3.algorithm_and_algorithm_evaluation.md +++ "b/docs/manuscripts/ds/\345\237\272\347\241\200\345\205\245\351\227\250/3.\347\256\227\346\263\225\345\222\214\347\256\227\346\263\225\350\257\204\344\273\267.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/\345\237\272\347\241\200\345\205\245\351\227\250/basic_introduction.png" similarity index 100% rename from docs/manuscripts/ds/basic-introduction/basic_introduction.png rename to "docs/manuscripts/ds/\345\237\272\347\241\200\345\205\245\351\227\250/basic_introduction.png" diff --git a/docs/manuscripts/ds/basic-introduction/readme.md "b/docs/manuscripts/ds/\345\237\272\347\241\200\345\205\245\351\227\250/readme.md" similarity index 100% rename from docs/manuscripts/ds/basic-introduction/readme.md rename to "docs/manuscripts/ds/\345\237\272\347\241\200\345\205\245\351\227\250/readme.md" diff --git "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/1.\346\240\210\347\232\204\345\237\272\346\234\254\346\246\202\345\277\265\345\222\214\345\237\272\346\234\254\346\223\215\344\275\234.md" "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/1.\346\240\210\347\232\204\345\237\272\346\234\254\346\246\202\345\277\265\345\222\214\345\237\272\346\234\254\346\223\215\344\275\234.md" index ccf9a3f5..e7dcf12e 100644 --- "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/1.\346\240\210\347\232\204\345\237\272\346\234\254\346\246\202\345\277\265\345\222\214\345\237\272\346\234\254\346\223\215\344\275\234.md" +++ "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/1.\346\240\210\347\232\204\345\237\272\346\234\254\346\246\202\345\277\265\345\222\214\345\237\272\346\234\254\346\223\215\344\275\234.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/\346\240\210\345\222\214\351\230\237\345\210\227/2.\346\240\210\347\232\204\351\241\272\345\272\217\345\255\230\345\202\250\347\273\223\346\236\204.md" "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/2.\346\240\210\347\232\204\351\241\272\345\272\217\345\255\230\345\202\250\347\273\223\346\236\204.md" index 05353127..f49052ed 100644 --- "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/2.\346\240\210\347\232\204\351\241\272\345\272\217\345\255\230\345\202\250\347\273\223\346\236\204.md" +++ "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/2.\346\240\210\347\232\204\351\241\272\345\272\217\345\255\230\345\202\250\347\273\223\346\236\204.md" @@ -1,3 +1,10 @@ +--- +title: 栈的顺序存储结构 +#description: +permalink: /manuscripts/ds/stack-sequential-storage.html +head: + - [meta, { name: 数据结构 , content: 栈的顺序存储结构 }] +--- # 栈的顺序存储结构 diff --git "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/3.\346\240\210\347\232\204\351\223\276\345\274\217\345\255\230\345\202\250\347\273\223\346\236\204.md" "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/3.\346\240\210\347\232\204\351\223\276\345\274\217\345\255\230\345\202\250\347\273\223\346\236\204.md" index c4bed53a..8007d787 100644 --- "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/3.\346\240\210\347\232\204\351\223\276\345\274\217\345\255\230\345\202\250\347\273\223\346\236\204.md" +++ "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/3.\346\240\210\347\232\204\351\223\276\345\274\217\345\255\230\345\202\250\347\273\223\346\236\204.md" @@ -1,3 +1,11 @@ +--- +title: 栈的链式存储结构 +#description: +permalink: /manuscripts/ds/stack-chained-storage.html +head: + - [meta, { name: 数据结构 , content: 栈的链式存储结构 }] +--- + # 栈的链式存储结构 `链栈`: 采用链式存储的栈 diff --git "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/4.\351\230\237\345\210\227\347\232\204\345\237\272\346\234\254\346\246\202\345\277\265\345\222\214\346\223\215\344\275\234.md" "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/4.\351\230\237\345\210\227\347\232\204\345\237\272\346\234\254\346\246\202\345\277\265\345\222\214\346\223\215\344\275\234.md" index 61f9b6cc..6a8caca7 100644 --- "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/4.\351\230\237\345\210\227\347\232\204\345\237\272\346\234\254\346\246\202\345\277\265\345\222\214\346\223\215\344\275\234.md" +++ "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/4.\351\230\237\345\210\227\347\232\204\345\237\272\346\234\254\346\246\202\345\277\265\345\222\214\346\223\215\344\275\234.md" @@ -1,3 +1,11 @@ +--- +title: 队列的基本概念和操作 +#description: +permalink: /manuscripts/ds/queue-basic-concepts.html +head: + - [meta, { name: 数据结构 , content: 队列的基本概念和操作 }] +--- + # 队列的基本概念和操作 diff --git "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/5.\351\230\237\345\210\227\347\232\204\351\241\272\345\272\217\345\255\230\345\202\250\347\273\223\346\236\204.md" "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/5.\351\230\237\345\210\227\347\232\204\351\241\272\345\272\217\345\255\230\345\202\250\347\273\223\346\236\204.md" index abcdae73..f9f47513 100644 --- "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/5.\351\230\237\345\210\227\347\232\204\351\241\272\345\272\217\345\255\230\345\202\250\347\273\223\346\236\204.md" +++ "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/5.\351\230\237\345\210\227\347\232\204\351\241\272\345\272\217\345\255\230\345\202\250\347\273\223\346\236\204.md" @@ -1,3 +1,11 @@ +--- +title: 队列的顺序存储结构 +#description: +permalink: /manuscripts/ds/queue-sequential-storage.html +head: + - [meta, { name: 数据结构 , content: 队列的顺序存储结构 }] +--- + # 队列的顺序存储结构 diff --git "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/6.\351\230\237\345\210\227\347\232\204\351\223\276\345\274\217\345\255\230\345\202\250\347\273\223\346\236\204.md" "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/6.\351\230\237\345\210\227\347\232\204\351\223\276\345\274\217\345\255\230\345\202\250\347\273\223\346\236\204.md" index 660cb22f..6562e27b 100644 --- "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/6.\351\230\237\345\210\227\347\232\204\351\223\276\345\274\217\345\255\230\345\202\250\347\273\223\346\236\204.md" +++ "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/6.\351\230\237\345\210\227\347\232\204\351\223\276\345\274\217\345\255\230\345\202\250\347\273\223\346\236\204.md" @@ -1,4 +1,10 @@ - +--- +title: 队列的链式存储结构 +#description: +permalink: /manuscripts/ds/queue-chained-storage.html +head: +- [meta, { name: 数据结构 , content: 队列的链式存储结构 }] +--- # 队列的链式存储结构 `链队列`:和顺序队列一样,基于队列的链式表示叫做`链队列`,实际上为:**一个同时带有队头指针和队尾指针的单链表** diff --git "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/7.\346\240\210VS\351\230\237\345\210\227\350\241\245\345\205\205.md" "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/7.\346\240\210VS\351\230\237\345\210\227\350\241\245\345\205\205.md" index eac06bd1..0bef9679 100644 --- "a/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/7.\346\240\210VS\351\230\237\345\210\227\350\241\245\345\205\205.md" +++ "b/docs/manuscripts/ds/\346\240\210\345\222\214\351\230\237\345\210\227/7.\346\240\210VS\351\230\237\345\210\227\350\241\245\345\205\205.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/\347\272\277\346\200\247\350\241\250/1.\345\237\272\347\241\200\346\246\202\345\277\265\345\222\214\346\223\215\344\275\234.md" similarity index 92% rename from docs/manuscripts/ds/linear-table/1.basic_concept_and_operation.md rename to "docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/1.\345\237\272\347\241\200\346\246\202\345\277\265\345\222\214\346\223\215\344\275\234.md" index 8b2d5bb0..ca5b623d 100644 --- a/docs/manuscripts/ds/linear-table/1.basic_concept_and_operation.md +++ "b/docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/1.\345\237\272\347\241\200\346\246\202\345\277\265\345\222\214\346\223\215\344\275\234.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/\347\272\277\346\200\247\350\241\250/2.\351\241\272\345\272\217\350\241\250\347\244\272.md" similarity index 95% rename from docs/manuscripts/ds/linear-table/2.sequential_representation.md rename to "docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/2.\351\241\272\345\272\217\350\241\250\347\244\272.md" index 9b0f6c39..4a52ef6d 100644 --- a/docs/manuscripts/ds/linear-table/2.sequential_representation.md +++ "b/docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/2.\351\241\272\345\272\217\350\241\250\347\244\272.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/\347\272\277\346\200\247\350\241\250/3.\351\223\276\345\274\217\350\241\250\347\244\272.md" similarity index 98% rename from docs/manuscripts/ds/linear-table/3.chained_representation.md rename to "docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/3.\351\223\276\345\274\217\350\241\250\347\244\272.md" index a64e27fa..e06ba17b 100644 --- a/docs/manuscripts/ds/linear-table/3.chained_representation.md +++ "b/docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/3.\351\223\276\345\274\217\350\241\250\347\244\272.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.\346\200\273\347\273\223.md" "b/docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/4.\346\200\273\347\273\223.md" similarity index 96% rename from "docs/manuscripts/ds/linear-table/4.\346\200\273\347\273\223.md" rename to "docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/4.\346\200\273\347\273\223.md" index cd3f3166..801ef81f 100644 --- "a/docs/manuscripts/ds/linear-table/4.\346\200\273\347\273\223.md" +++ "b/docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/4.\346\200\273\347\273\223.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/\347\272\277\346\200\247\350\241\250/readme.md" similarity index 100% rename from docs/manuscripts/ds/linear-table/readme.md rename to "docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/readme.md" diff --git "a/docs/manuscripts/ds/linear-table/\347\272\277\346\200\247\350\241\250_\346\260\264\345\215\260.png" "b/docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/\347\272\277\346\200\247\350\241\250_\346\260\264\345\215\260.png" similarity index 100% rename from "docs/manuscripts/ds/linear-table/\347\272\277\346\200\247\350\241\250_\346\260\264\345\215\260.png" rename to "docs/manuscripts/ds/\347\272\277\346\200\247\350\241\250/\347\272\277\346\200\247\350\241\250_\346\260\264\345\215\260.png" diff --git a/docs/readme.md b/docs/readme.md index 70a9e027..ffdeddc1 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