diff --git a/.dockerignore b/.dockerignore index 696ef35..7a34581 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,3 @@ node_modules .idea .github -.husky \ No newline at end of file diff --git a/README.md b/README.md index 1b6fb64..796e7a0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + +

408Logo图片 @@ -28,7 +30,21 @@

-### 在线浏览 +## 写最前面 + +`408CSFamily` 我的理解是:408计算机专业课”全家桶“,而408相信考研er都知道计算机考研专业课代码;在最新的高校计算机研究生招考中,已经越来越多的学校改考408。可见408所涉及到的专业课举足轻重的地位;不论是在考研或者找工作,我相信408的专业基础必定是难以避免的,所以话不多说、形势复杂,唯一能做的就是不停的学习、巩固基础知识,加油! + +本仓库收录的大部分内容将来源我自己的学习输出和相关资料的整理, +将会站在上班族的角度进行整理、输出。若有任何疑惑和问题, +欢迎在仓库集中`PR`或`ISSUES`提出。 + +**阅读之前必看:** + +- **大家善用快捷键Ctrl+F,没有效访问链接的代表尚未完成** +- 注意学科学习顺序,建议:`数据结构` --> `操作系统`、`计算机组成原理` --> `计算机网络` +- 学习切忌浮于表面,戒骄戒躁。408考试知识点多、杂,非常容易忘,**抓大放小、先易后难、反复多次** + +## 在线浏览 - 稳定版: @@ -38,70 +54,45 @@ - Netlify: - Vercel: -## 写最前面 +[//]: # (## 思维导图【MD文档版本】) +[//]: # (- [数据结构](./manuscripts/数据结构/数据结构和算法.md)) +[//]: # (- 计算机组成原理(TBD)) +[//]: # (- 操作系统(TBD)) +[//]: # (- 计算机网络(TBD)) -`408CSFamily` 我的理解是:408计算机专业课”全家桶“,而408相信考研er都知道计算机考研专业课代码;在最新的高校计算机研究生招考中,已经越来越多的学校改考408。可见408所涉及到的专业课举足轻重的地位;不论是在考研或者找工作,我相信408的专业基础必定是难以避免的,所以话不多说、形势复杂,唯一能做的就是不停的学习、巩固基础知识,加油! +## 学习资料 -本仓库收录的大部分内容将来源我自己的学习输出和相关资料的整理,将会站在上班族的角度进行分类、输出,若有任何疑惑和问题,欢迎在github仓库集中pr或issues提出 - -**阅读之前必看:** - -1. 长期更新、维护 -2. 建议结合思维导图进行学习 - -### 思维导图【MD文档版本】 - -> 主要是关键知识,更新优化中... - -- [数据结构](./manuscripts/数据结构/数据结构和算法.md) -- 计算机组成原理(TBD) -- 操作系统(TBD) -- 计算机网络(TBD) - -## 电子书PDF - -### 王道 +### 电子书PDF - 王道 - 数据结构2019: 密码: euja - - 计算机组成原理2019: 密码: wic5 - - 计算机网络2019: 密码: dpkb - - 操作系统2019: 密码: o9b3 -## 学习视频 +### 学习视频 -> 不是王道工作人员,不做任何推销,只是感觉看书不太行的话还是得找找视频辅助下,就发现了王道视频。 -> 唯一要推销的可能是我的B站:**[Rong姐姐好可爱](https://space.bilibili.com/350937042)** -> -> 补充:视频都是王道官方的,我自己有时也会用这个,如果链接失效可以去B站搜搜哈 +> **不是王道工作人员,不做任何推销**,只是感觉看书不太行的话还是得找找视频辅助下,就发现了王道官方视频,我自己有时也会用这个,如果链接失效可以去B站搜! - [数据结构](https://www.bilibili.com/video/BV1b7411N798) - [计算机组成原理](https://www.bilibili.com/video/BV1BE411D7ii) - [操作系统](https://www.bilibili.com/video/BV1YE411D7nH) - [计算机网络](https://www.bilibili.com/video/BV19E411D78Q) -## 大纲目录(善用Ctrl+F) +## 数据结构 -**注意:没有链接的,可以在仓库找找,只是选择性进行博客和公众号发表** - -### 数据结构 - -> 参考资料 +> 参考资料: > > - 《数据结构》 . > - 《大话数据结构》. -> - 《数据结构与算法景点问题解析》 第二版 Narasimha Karumanchi著. > - 《计算机网络-王道考研》 2019 王道论坛著. -#### 基础入门 +### 基础入门 - [基础概念](https://mp.weixin.qq.com/s/M8MOCVnbVxQ3GRuxRaEKIg) - [数据结构三要素](https://mp.weixin.qq.com/s/7sCoHDFtI-Qp0wBcvMH6kQ) - [算法与算法评价](https://mp.weixin.qq.com/s/58fBAwoyg2Ali-HqOJ6t9g) -#### 线性表 +### 线性表 - [基础概念和基本操作](https://mp.weixin.qq.com/s/3e5LX9HbnjfT980zV3veXA) - [线性表的顺序表示](https://mp.weixin.qq.com/s/gaXmF3tqZxxFXhhDyPZv-A) @@ -113,25 +104,25 @@ - [存储结构的选取](https://mp.weixin.qq.com/s?__biz=MzU3MTUxOTIwMw==&mid=2247485549&idx=1&sn=4b7091696c40874a7dcfc682ca18db61&chksm=fcdfb1e1cba838f7e611341fe3b6f3c45fc6efcdce18e79be244a349c87a8e6abcbbd33c250c&token=1697862929&lang=zh_CN#rd) - [零碎知识补充](https://mp.weixin.qq.com/s?__biz=MzU3MTUxOTIwMw==&mid=2247485549&idx=2&sn=5282cd006b6c33e4bfe992298602e053&chksm=fcdfb1e1cba838f743a335bad530cf415eef57a417b807257d8ed6983047c2d57d5552b34cb0&token=1697862929&lang=zh_CN#rd) -#### 栈 +### 栈 - 基本概念和操作 - 顺序存储结构 - 链式存储结构 -#### 队列 +### 队列 - 基本概念和操作 - 顺序存储结构 - 链式存储结构 -#### 串 +### 串 - 基本概念 - 简单的模式匹配 - KMP算法 -#### 树与二叉树 +### 树与二叉树 - 基本概念 - 二叉树 @@ -140,14 +131,14 @@ - 树和森林 - 树的应用 -#### 图论 +### 图论 - 基本概念 - 图的存储 - 图的遍历 - 图的应用 -#### 查找 +### 查找 - 基本概念 - 顺序查找 @@ -155,7 +146,7 @@ - B树和B+树 - 散列表 -#### 排序 +### 排序 - 基本概念 - 插入排序 @@ -165,87 +156,87 @@ - 基数排序 - 外部排序 -### 计算机操作系统 +## 计算机操作系统 -> 参考资料 +> 参考资料: > > - 《计算机操作系统》 第四版 汤小丹、梁红兵、汤子瀛著 > - 《操作系统-王道考研》 2019 王道论坛 -#### 系统概述 +### 系统概述 - 引论 - 发展和分类 - 运行环境 - 体系结构 -#### 进程管理 +### 进程管理 - 进程和线程 - 处理机调度 - 进程同步 - 死锁 -#### 内存管理 +### 内存管理 - 引论 - 虚拟内存 - 一些总结 -#### 文件管理 +### 文件管理 - 基本概念 - 文件系统 - 磁盘管理 - 一些总结 -#### 输入、输出管理 +### 输入、输出管理 - 基本概述 - 核心子系统 - 高速缓存和缓冲区 - 一些总结 -### 计算机组成原理 +## 计算机组成原理 -> 参考资料 +> 参考资料: > > - 《计算机组成原理》 第二版 唐朔飞 > - 《计算机组成原理-王道考研》 2019 王道论坛 -#### 概述 +### 概述 -#### 数据的表示和运算 +### 数据的表示和运算 -#### 存储系统 +### 存储系统 -#### 指令系统 +### 指令系统 -#### 中央处理器 +### 中央处理器 -#### 总线 +### 总线 -#### 输入输出系统 +### 输入输出系统 -### 计算机网络 +## 计算机网络 -> 参考资料 +> 参考资料: > > - 《计算机网络-第七版》 谢希仁著. > - 《计算机网络-王道考研》 2019 王道论坛. -#### 体系机构 +### 体系机构 - 基本介绍 - 体系结构与参考模型 -#### 物理层 +### 物理层 - 通信基础 - 传输介质 - 物理层设备 -#### 数据链路层 +### 数据链路层 - 基本功能 - 组帧 @@ -256,7 +247,7 @@ - 广域网 - 通信设备 -#### 网络层 +### 网络层 - 基本功能 - 路由算法 @@ -266,13 +257,13 @@ - IP组播&移动IP - 网络层设备 -#### 传输层 +### 传输层 - 提供的服务 - UDP协议 - TCP协议 -#### 应用层 +### 应用层 - 应用模型 - DNS @@ -280,26 +271,33 @@ - 电子邮件 - HTTP协议 + + +[//]: # (宣传内容) + + +## 提交记录 + ## 赞赏列表 -以下排名不分先后! [传送门→]() **赞赏过的一定要微信跟我说呀!!!!!!** +以下排名不分先后! **赞赏过的一定要微信跟我说呀!!!!!!** ## 赞助商 -**以下排名不分先后! 还木有收到赞助,哈哈哈,先留坑** +以下排名不分先后! 还木有收到赞助,哈哈哈,先留坑 ## 贡献 -感谢向仓库提交mr的所有开发者 +> 感谢向仓库提交PR的所有开发者 [![contributors](https://contrib.rocks/image?repo=142vip/408CSFamily)](https://github.com/142vip/408CSFamily/graphs/contributors) @@ -318,11 +316,11 @@ 关注公众号联系作者
@@ -374,7 +372,24 @@ style="margin: 5px;width: 24px;height: 24px;"> +
+
+ + 作者: 储凡 + +
+ +
-交流/加群/互看朋友圈 -当然:**聊天 /提问 /建议 /提需求** 可以在本公众号直接**私信**,后台可以看到,有时间即会回复,偶尔的延迟和疏漏还请小伙伴们谅解,蟹蟹。 +交流/加群/互看朋友圈, +当然:**聊天/提问/建议/提需求** 可以在公众号直接**私信**,后台可以看到。有时间即会回复,偶尔的延迟和疏漏还请小伙伴们谅解,蟹蟹。 + + \ No newline at end of file diff --git a/docs/.vuepress/config/navbar.ts b/docs/.vuepress/config/navbar.ts index cb7fff4..f75c331 100644 --- a/docs/.vuepress/config/navbar.ts +++ b/docs/.vuepress/config/navbar.ts @@ -6,11 +6,10 @@ export const navbar = [ text: '首页', link: '/' }, - // { - // text: "数据结构", - // link: "/manuscripts/ds" - // }, - "/manuscripts/ds", + { + text: "数据结构", + link: "/manuscripts/ds" + }, { text: "操作系统", link: "/manuscripts/os" @@ -28,13 +27,39 @@ export const navbar = [ text: '思维导图', link: "/manuscripts/mark-map", }, - // http://localhost:4200/mark-map/job-poster-bytedance.html { - text: "网站", + text: "了解更多", children: [ - "/big-event-history.md", - "/changelog.md", - "/wechat-list.md" - ] + { + text: '变更记录', + link: '/manuscripts/changelog.md' + }, + { + text: '网站动态', + link: '/manuscripts/big-event-history.md' + }, + { + text: "自媒体", + children: [ + { + text: "公众号文章", + link: "/manuscripts/wechat-list.md" + }, + ] + }, + { + text: "外链", + children: [ + // { + // text: '常用网站', + // link: '/manuscripts/frequent-site-link.md' + // }, + { + text: "RoadMap计划", + link: "https://142vip-cn.feishu.cn/share/base/view/shrcnpso8R4vCid01wmg66hFjae" + } + ] + }, + ], }, ]; diff --git a/docs/.vuepress/config/theme.config.ts b/docs/.vuepress/config/theme.config.ts index 5adad64..bfb6bc5 100644 --- a/docs/.vuepress/config/theme.config.ts +++ b/docs/.vuepress/config/theme.config.ts @@ -108,8 +108,10 @@ export default { // 自定义对齐 align: true, }, + // 不自动生成readme目录 + autoCatalog: false, + // 参考:https://theme-hope.vuejs.press/zh/guide/markdown/components.html components: { - // 插件选项 components: [ "ArtPlayer", "AudioPlayer", diff --git a/docs/.vuepress/public/mark-map/cn-map.html b/docs/.vuepress/public/mark-map/cn-map.html index bb7a773..e928b0b 100644 --- a/docs/.vuepress/public/mark-map/cn-map.html +++ b/docs/.vuepress/public/mark-map/cn-map.html @@ -16,11 +16,11 @@ height: 100vh; } - + - + })(() => window.markmap,null,{"type":"heading","depth":0,"payload":{"lines":[1,2]},"content":"计算机网络","children":[{"type":"heading","depth":1,"payload":{"lines":[5,6]},"content":"体系结构","children":[]},{"type":"heading","depth":1,"payload":{"lines":[7,8]},"content":"物理层","children":[]},{"type":"heading","depth":1,"payload":{"lines":[9,10]},"content":"数据链路层","children":[]},{"type":"heading","depth":1,"payload":{"lines":[11,12]},"content":"网络层","children":[]},{"type":"heading","depth":1,"payload":{"lines":[13,14]},"content":"传输层","children":[]},{"type":"heading","depth":1,"payload":{"lines":[15,16]},"content":"应用层","children":[]},{"type":"heading","depth":1,"payload":{"lines":[17,18]},"content":"一些总结","children":[]}]},null) diff --git a/docs/.vuepress/public/mark-map/ds-map.html b/docs/.vuepress/public/mark-map/ds-map.html index e31b24e..19f6b2c 100644 --- a/docs/.vuepress/public/mark-map/ds-map.html +++ b/docs/.vuepress/public/mark-map/ds-map.html @@ -35,6 +35,6 @@ }) + })(() => window.markmap,null,{"type":"heading","depth":0,"payload":{"lines":[1,2]},"content":"数据结构","children":[{"type":"heading","depth":1,"payload":{"lines":[5,6]},"content":"基础入门","children":[{"type":"heading","depth":2,"payload":{"lines":[7,8]},"content":"基本概念","children":[{"type":"list_item","depth":3,"payload":{"lines":[9,10]},"content":"数据","children":[{"type":"list_item","depth":4,"payload":{"lines":[11,12]},"content":"信息的载体","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[12,13]},"content":"客观事物属性的数、字符以及所有能够输入到计算机包中并且被计算机程序识别和处理的集合","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[14,15]},"content":"数据元素","children":[{"type":"list_item","depth":4,"payload":{"lines":[16,17]},"content":"数据的基本单位","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[17,18]},"content":"一个数据元素由若干个数据项组成","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[18,19]},"content":"数据项是构成数组元素的最小单位,且不可分割","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[20,21]},"content":"数据对象","children":[{"type":"list_item","depth":4,"payload":{"lines":[22,23]},"content":"具有相同性质的数据元素的集合","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[23,24]},"content":"数据的子集","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[25,26]},"content":"数据类型","children":[{"type":"list_item","depth":4,"payload":{"lines":[27,28]},"content":"原子类型:不可再分的数据类型","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[28,29]},"content":"结构类型:可以分解成若干分量(成分)的数据类型","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[29,30]},"content":"抽象数据类型:抽象出具组织和其相关的操作","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[31,32]},"content":"抽象数据类型(ADT)","children":[{"type":"list_item","depth":4,"payload":{"lines":[33,34]},"content":"定义:一个数学模型以及定义在该模型上的一组操作","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[34,35]},"content":"特点:与计算机内部如何表示和实现是没有关系","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[35,36]},"content":"作用:数据封装和信息隐藏,让实现与使用相分离","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[36,37]},"content":"注意:不论内部结构如何变化,只要其数学特性不变,就不会影响到外部的使用","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[38,39]},"content":"数据结构(三要素)","children":[{"type":"list_item","depth":3,"payload":{"lines":[40,41]},"content":"逻辑结构","children":[{"type":"list_item","depth":4,"payload":{"lines":[42,43]},"content":"线性结构:线性表、栈、队列、串、数组...","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[43,44]},"content":"非线性结构:树、图、集合...","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[44,45]},"content":"集合:除了“同属于一个集合”的关系外,别无其他关系。","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[45,46]},"content":"线性结构:只存在一对一的关系。","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[46,47]},"content":"树形结构:存在一对多的关系。","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[47,48]},"content":"图状结构和网状结构:存在多对多的关系。","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[49,50]},"content":"存储(物理)结构","children":[{"type":"list_item","depth":4,"payload":{"lines":[51,52]},"content":"顺序存储","children":[{"type":"list_item","depth":5,"payload":{"lines":[53,54]},"content":"逻辑上相邻的元素存储在物理位置上也相邻的存储单元里,元素之间的关系由存储单元的邻接关系来体现","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[54,55]},"content":"优点","children":[{"type":"list_item","depth":6,"payload":{"lines":[56,57]},"content":"可以实现随机存取","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[57,58]},"content":"元素占用最少的存储空间","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[59,60]},"content":"缺点","children":[{"type":"list_item","depth":6,"payload":{"lines":[61,62]},"content":"只能使用相邻的一整块存储单元,依赖于物理结构相邻","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[62,63]},"content":"容易产生外部碎片","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[64,65]},"content":"链式存储","children":[{"type":"list_item","depth":5,"payload":{"lines":[66,67]},"content":"与顺序存储不同,链式存储不要求逻辑上相邻的元素在物理位置上也相邻","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[67,68]},"content":"优点","children":[{"type":"list_item","depth":6,"payload":{"lines":[69,70]},"content":"不会出现碎片现象","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[70,71]},"content":"充分利用所有存储单元","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[72,73]},"content":"缺点","children":[{"type":"list_item","depth":6,"payload":{"lines":[74,75]},"content":"除了存储元素外,还需要额外存储指针,会占用额外的存储空间(结合数据库索引学习)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[75,76]},"content":"链式存储,只能实现顺序存取,不能实现随机存取(指针的遍历)","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[77,78]},"content":"索引存储","children":[{"type":"list_item","depth":5,"payload":{"lines":[79,80]},"content":"存放数据元素和元素间关系的存储方式,在存储元素信息的同时,还需要建立附加的索引表","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[80,81]},"content":"优点","children":[{"type":"list_item","depth":6,"payload":{"lines":[82,83]},"content":"检索快(就好比字典有了目录,查询就很快了)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[84,85]},"content":"缺点","children":[{"type":"list_item","depth":6,"payload":{"lines":[86,87]},"content":"增加了索引表,占用较多的存储空间(典型的空间换时间策略)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[87,88]},"content":"增加、删除数据时,需要对应修改索引表,花费更多时间","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[89,90]},"content":"散列(Hash)存储","children":[{"type":"list_item","depth":5,"payload":{"lines":[91,92]},"content":"根据元素的关键字直接通过散列(Hash)函数计算出元素的存储地址。","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[92,93]},"content":"优点","children":[{"type":"list_item","depth":6,"payload":{"lines":[94,95]},"content":"检索快","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[95,96]},"content":"添加、删除元素结点操作快(获取元素地址直接,整体时间就少了)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[97,98]},"content":"缺点","children":[{"type":"list_item","depth":6,"payload":{"lines":[99,100]},"content":"非常依赖于散列函数","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[100,101]},"content":"会出现散列冲突(主要依赖与散列函数,散列函数不好就很容易出现散列冲突)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[101,102]},"content":"出现散列冲突时,解决冲突就会增加时间和空间上的开销","children":[]}]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[103,104]},"content":"数据的运算","children":[{"type":"list_item","depth":4,"payload":{"lines":[105,106]},"content":"运算的定义:针对逻辑结构,指出运算的功能","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[106,107]},"content":"运算的实现:针对存储结构,指出运算的具体操作步骤","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[108,109]},"content":"算法与算法评价","children":[{"type":"list_item","depth":3,"payload":{"lines":[110,111]},"content":"算法","children":[{"type":"list_item","depth":4,"payload":{"lines":[112,113]},"content":"定义","children":[{"type":"list_item","depth":5,"payload":{"lines":[114,115]},"content":"对特定问题求解步骤的一种描述","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[115,116]},"content":"是指令的有序集合","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[116,117]},"content":"每一条指令表示一个或多个操作","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[118,119]},"content":"五大特性","children":[{"type":"list_item","depth":5,"payload":{"lines":[120,121]},"content":"有穷性:执行有穷步后结束、在有穷时间内完成","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[121,122]},"content":"确定性:每条指令的含义明确,不会产生二义性,对相同的输入只能得出相同的结果","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[122,123]},"content":"可行性:算法中描述的操作都是可以通过已经实现的基本运算执行有限次来实现的","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[123,124]},"content":"输入:有零个或者多个输入,输入取决于某个特定的对象的集合","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[124,125]},"content":"输出:有一个或者多个输出,输出是和输入有着某种特定关系的量","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[126,127]},"content":"好算法追求的目标","children":[{"type":"list_item","depth":5,"payload":{"lines":[128,129]},"content":"正确性:需要正确的解决求解问题","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[129,130]},"content":"可读性:便于理解","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[130,131]},"content":"健壮性:在输入非法数据时,算法也能适当地做出反应或进行处理,而不会产生莫名奇妙的输出结果","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[131,132]},"content":"效率与低存储量需求","children":[{"type":"list_item","depth":6,"payload":{"lines":[133,134]},"content":"效率:算法执行的时间--->时间复杂度","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[134,135]},"content":"存储量需求:算法那执行过程中所有要的最大存储空间--->空间复杂度","children":[]}]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[136,137]},"content":"算法的评价","children":[{"type":"list_item","depth":4,"payload":{"lines":[138,139]},"content":"程序语句频度:程序语句在算法中被重复执行的次数","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[139,140]},"content":"时间复杂度O(n)","children":[{"type":"list_item","depth":5,"payload":{"lines":[141,142]},"content":"最坏空间复杂度:最坏情况下,算法的时间复杂度","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[142,143]},"content":"平均空间复杂度:所有可能输入实例在同等概率出现的情况下,算法的期望运行时间","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[143,144]},"content":"最好空间复杂度:最好的情况下,算法的时间复杂度","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[145,146]},"content":"空间复杂度S(n)","children":[{"type":"list_item","depth":5,"payload":{"lines":[147,148]},"content":"用来定义算法运行过程中需要耗费的存储空间","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[148,150]},"content":"渐进空间复杂度也被称为空间复杂度
\n记作:S(n)=O(g(n))","children":[]}]}]}]}]},{"type":"heading","depth":1,"payload":{"lines":[151,152]},"content":"线性表","children":[{"type":"heading","depth":2,"payload":{"lines":[153,154]},"content":"定义和基本操作","children":[{"type":"list_item","depth":3,"payload":{"lines":[155,156]},"content":"基本概念","children":[{"type":"list_item","depth":4,"payload":{"lines":[157,158]},"content":"定义:线性表是具有相同数据类型的n(n≥0)个数据元素的有限序列","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[158,159]},"content":"逻辑特性","children":[{"type":"list_item","depth":5,"payload":{"lines":[160,161]},"content":"除表头元素外,线性表中每个元素有且仅有一个","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[161,162]},"content":"除表尾元素外,线性表中每个元素有且仅有一个直接后继","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[163,164]},"content":"基本特点","children":[{"type":"list_item","depth":5,"payload":{"lines":[165,166]},"content":"元素个数有限","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[166,167]},"content":"逻辑上具有顺序性","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[167,168]},"content":"每个元素都是单个元素","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[168,169]},"content":"数据类型都相同,元素存储空间大小一致","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[169,170]},"content":"元素具有抽象性,只讨论逻辑关系","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[171,172]},"content":"基本操作","children":[{"type":"list_item","depth":4,"payload":{"lines":[173,174]},"content":"InitList(&L): 初始化表。构造空的线性表","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[174,175]},"content":"Length(L):获取表的长度。返回线性表L的长度,即表中的数据元素个数","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[175,176]},"content":"LocateElem(L,e):按值查找操作。在表L中国查找具有给定关键字的元素","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[176,177]},"content":"GetElem(L,i):按位查找操作。获取表中第i个位置的元素的值","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[177,178]},"content":"ListInsert(&L,i,e):插入操作。在表的第i个位置上插入指定元素e","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[178,179]},"content":"ListDelete(&L,i,&e):删除操作。删除表中第i个位置的元素,并用e返回删除元素的值","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[179,180]},"content":"PrintList(L):输出操作。按照前后顺序(如:1、2....n)输出线性表的所有元素值","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[180,181]},"content":"Empty(L):判空操作。当表L为空,则返回true,否则返回false","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[181,182]},"content":"DestoryList(&L):销毁操作。将线性表销毁,释放线性表L所占用的内存空间","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[183,184]},"content":"顺序表示","children":[{"type":"list_item","depth":3,"payload":{"lines":[185,186]},"content":"基础概念","children":[{"type":"list_item","depth":4,"payload":{"lines":[187,188]},"content":"定义","children":[{"type":"list_item","depth":5,"payload":{"lines":[189,190]},"content":"顺序表:顺序存储的线性表","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[190,191]},"content":"顺序表中的元素的逻辑顺序与实际的物理位置相同","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[191,192]},"content":"线性表中的元素的位序是从1开始的,数组中的元素的下标是从0开始的","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[193,194]},"content":"存储分配","children":[{"type":"list_item","depth":5,"payload":{"lines":[195,196]},"content":"静态分配:数组的大小和空间都是实现确定好的,一旦存储空间占满就会产生溢出,直接导致程序崩溃","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[196,197]},"content":"动态分配:存储数据的空间在程序执行过程中通过动态存储分配语句分配的,即便是数据空间占满,也可以另外开辟一块更大的空间,来替换原来的存储空间","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[197,198]},"content":"malloc()函数: 指针型函数,返回的指针指向该分配域的开头的位置。作用是在内存的动态存储区中分配一个长度为size的连续空间","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[198,199]},"content":"动态分配不是链式存储,而是属于顺序存储结构,动态分配的物理结构没有改变,依然是随机存取的方式。只是分配的空间大小可以在运行时决定","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[200,201]},"content":"重要特点","children":[{"type":"list_item","depth":5,"payload":{"lines":[202,203]},"content":"随机访问【重要】","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[203,204]},"content":"存储密度高","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[204,205]},"content":"逻辑上相邻的元素物理上也相邻","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[206,207]},"content":"基本操作","children":[{"type":"list_item","depth":4,"payload":{"lines":[208,209]},"content":"插入元素","children":[{"type":"list_item","depth":5,"payload":{"lines":[210,211]},"content":"在顺序表L的第i(1≤i≤L.length+1)个位置插入新元素,成功返回true,失败返回false","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[211,212]},"content":"时间复杂度","children":[{"type":"list_item","depth":6,"payload":{"lines":[213,214]},"content":"最好情况:在表尾插入,元素向后移动循环没有执行,时间复杂度O(1);","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[214,215]},"content":"最坏情况:在表头插入,元素后移循环执行n次,时间复杂度为O(n);","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[215,216]},"content":"平均情况:随机插入,平均次数为:n/2,对应的平均复杂度为O(n);","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[217,218]},"content":"平均时间复杂度为:O(n)","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[219,220]},"content":"删除元素","children":[{"type":"list_item","depth":5,"payload":{"lines":[221,222]},"content":"删除顺序表L中第i(1≤i≤L.length+1)个位置的元素。成功则返回true,将被删除的元素用引用变量返回,失败则返回false","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[222,223]},"content":"时间复杂度","children":[{"type":"list_item","depth":6,"payload":{"lines":[224,225]},"content":"最好情况:删除表尾元素,不需要移动任何元素,时间复杂度为O(1);","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[225,226]},"content":"最坏情况:删除表头元素,需要移动除第一个元素外的所有元素,时间复杂度为O(n)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[226,227]},"content":"平均情况:随机删除,平均需要(n-1)/2,对应的时间复杂度为O(n)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[228,229]},"content":"平均时间复杂度为O(n)","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[230,231]},"content":"按值查找(顺序查找)","children":[{"type":"list_item","depth":5,"payload":{"lines":[232,233]},"content":"在顺序表L中查找第一个元素值等于e的元素查找成功返回该元素位序(不是角标),查找失败返回0","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[233,234]},"content":"位序(个人理解):元素在线性表中的位置序号,角标为i(角标从0开始),对应的位序为i+1(位序从1开始)。当返回为0时,则直接代表没有命中","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[234,235]},"content":"时间复杂度","children":[{"type":"list_item","depth":6,"payload":{"lines":[236,237]},"content":"最好情况:查找的元素在表头,只需要比较一次,循环成本最小,时间复杂度为O(1);","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[237,238]},"content":"最坏情况:查找的元素在表尾或者不存在,需要完整遍历,比较n次,时间复杂度为O(n);","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[238,239]},"content":"平均情况:随机查找表上的第i个(1≤i≤L.length)元素,平均次数为(n+1)/2,对应时间复杂度为O(n)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[240,241]},"content":"平均时间复杂度为O(n)","children":[]}]}]}]},{"type":"heading","depth":2,"payload":{"lines":[242,243]},"content":"链式表示","children":[{"type":"list_item","depth":3,"payload":{"lines":[244,245]},"content":"基础理解","children":[{"type":"list_item","depth":4,"payload":{"lines":[246,247]},"content":"链式存储线性表时,不需要使用连续的存储单元,不要求逻辑上相邻的两个元素在物理位置上也相邻","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[247,248]},"content":"链式存储线性表时,对线性表的插入、删除元素是不需要移动元素的,只是需要修改指针","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[248,249]},"content":"理解“链”的含义,链条--->捆绑、指向------>指针","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[250,251]},"content":"单链表","children":[{"type":"list_item","depth":4,"payload":{"lines":[252,253]},"content":"定义:线性表的链式存储称作单链表,通过一组任意的存储单元来存储线性表中的数据元素。","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[253,254]},"content":"每个链表结点(node)除了存放元素自身的信息外,还需要存放一个指向其后继结点的指针。通过指针建立起链表元素之间的线性关系","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[254,255]},"content":"单链表可以解决顺序表需要大量连续存储空间的缺点,但是单链表在数据域的基础上附加了指针域,存在浪费存储空间的缺点","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[255,256]},"content":"单链表的元素是离散地分布在存储空间中的,不能直接找到表中特定的结点,需要从头开始遍历、一次查找【单链表是非随机存取的存储结构】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[256,257]},"content":"头结点相关","children":[{"type":"list_item","depth":5,"payload":{"lines":[258,259]},"content":"定义:为了操作上的方便,在单链表第一个结点之前附加一个结点,叫做头结点。","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[259,260]},"content":"基本特点","children":[{"type":"list_item","depth":6,"payload":{"lines":[261,262]},"content":"不论单链表是否带头结点【可选】,头指针始终指向链表的第一个结点","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[262,263]},"content":"头结点的指针域指向线性表的第一个元素结点","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[263,264]},"content":"头结点的数据域可以不存任何信息、也可以记录表长等基础信息","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[264,265]},"content":"头结点是带头结点的链表中的第一个结点","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[266,267]},"content":"优点","children":[{"type":"list_item","depth":6,"payload":{"lines":[268,269]},"content":"因为开始结点的位置被存放在头结点的指针域中,所以在链表的第一个位置上的操作和在表的其他位置上的操作一致,不需要进行特殊处理","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[269,270]},"content":"无论链表是否为空,头指针始终是指向头结点的头结点的非空指针","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[270,271]},"content":"头结点的引入,很好的统一了空表和非空表的操作,有效避免头指针空指针异常问题","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[272,273]},"content":"基本操作","children":[{"type":"list_item","depth":5,"payload":{"lines":[274,275]},"content":"链表创建","children":[{"type":"list_item","depth":6,"payload":{"lines":[276,277]},"content":"头插法","children":[{"type":"list_item","depth":7,"payload":{"lines":[278,279]},"content":"定义:从空表开始,生成新的结点,将读取的数据存放在新结点的数据域中,将新结点插入到当前链表的表头【头结点之后】","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[279,280]},"content":"读入数据的顺序与生成的链表中的元素顺序是相反的","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[280,281]},"content":"每个结点插入的时间复杂度为O(1),单链表长度为n时,头插法的时间复杂度为O(n)","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[282,283]},"content":"尾插法","children":[{"type":"list_item","depth":7,"payload":{"lines":[284,285]},"content":"定义:新结点插入到当前链表的表尾上,必须增加一个尾指针r,始终指向当前链表的尾结点","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[285,286]},"content":"读入数据的顺序与生成的链表中的元素顺序完全一致","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[286,287]},"content":"每个结点插入的时间复杂度为O(1),单链表长度为n时,尾巴插法的时间复杂度为O(n)","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[287,288]},"content":"相比头插法附设了一个指向表尾结点的指针,但时间复杂度与头插法相同","children":[]}]}]},{"type":"list_item","depth":5,"payload":{"lines":[289,290]},"content":"按序号查找","children":[{"type":"list_item","depth":6,"payload":{"lines":[291,292]},"content":"定义:在单链表中从第一个结点出发,顺指针next域逐个往下搜索、遍历,直到找出第i个结点为止,否则返回最后一个结点指针域NULL","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[292,293]},"content":"时间复杂度为:O(n)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[294,295]},"content":"按值查找","children":[{"type":"list_item","depth":6,"payload":{"lines":[296,297]},"content":"定义:从单链表的第一个结点开始,从前往后依次比较表中个结点数据域的值,等于给定值e,则返回该结点的指针;若整个单链表【遍历完】中没有数据域值为e的结点,则返回NULL;","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[297,298]},"content":"时间复杂度为:O(n)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[299,300]},"content":"插入结点","children":[{"type":"list_item","depth":6,"payload":{"lines":[301,302]},"content":"定义:单链表中,将值为x的新结点插入到单链表的第i个位置上","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[302,303]},"content":"基本步骤","children":[{"type":"list_item","depth":7,"payload":{"lines":[304,305]},"content":"第一步: 检查插入位置的合法性;","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[305,306]},"content":"第二步: 找到待插入位置的前驱结点,即第(i-1)个结点;","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[306,307]},"content":"第三部: 在前驱结点后插入新结点;","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[307,308]},"content":"过程不能更换,避免后继指针不存在的问题","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[309,310]},"content":"时间复杂度","children":[{"type":"list_item","depth":7,"payload":{"lines":[311,312]},"content":"插入结点的时间复杂度集中在查找第(i-1)个元素,时间复杂度为O(n)","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[312,313]},"content":"如果在给定结点的后面插入新结点,只需要执行p->next=s操作,时间复杂度为O(1)","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[314,315]},"content":"前插操作:在某结点的前面插入一个新的结点","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[315,316]},"content":"后插操作:在某结点的后面插入一个新的结点,单链表插入算法中,通常采用后插操作的","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[316,317]},"content":"对结点的前插操作都可以转化为后插操作,前提:需要从单链表的头结点开始顺序查找到其前驱结点;时间复杂度为O(n)。","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[318,319]},"content":"删除结点","children":[{"type":"list_item","depth":6,"payload":{"lines":[320,321]},"content":"定义:将单链表L的第i个结点元素删除;","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[321,322]},"content":"基本步骤","children":[{"type":"list_item","depth":7,"payload":{"lines":[323,324]},"content":"第一步: 先检查删除位置的合法性;","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[324,325]},"content":"第二步: 查找表中的第(i-1)个结点,即被删结点的前驱结点;","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[325,326]},"content":"第三步: 移动指针,删除结点元素;","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[327,328]},"content":"和插入算法一样,时间都消耗在查询前驱结点上,时间复杂度为:O(n)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[328,329]},"content":"利用p结点的后继结点将p结点删除【经典思路】","children":[{"type":"list_item","depth":7,"payload":{"lines":[330,331]},"content":"第一步:申请结点q,使其只想p结点的后继结点;","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[331,332]},"content":"第二步:将p结点的数据域值换成其后继结点的数据域;【注意,交换没什么意义,最终p的后继结点会删除、释放】","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[332,333]},"content":"第三步:p的指针域指向q的指针域,q结点从链中“断开”","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[333,334]},"content":"第四步:释放q的内存空间","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[334,335]},"content":"相比按值查找前驱结点来删除给定的结点p,利用后继结点来删除的时间复杂度更小,为:O(1)","children":[]}]}]},{"type":"list_item","depth":5,"payload":{"lines":[336,337]},"content":"计算表长(遍历)","children":[{"type":"list_item","depth":6,"payload":{"lines":[338,339]},"content":"定义:计算单链表中数据结点(不含头结点)的个数","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[339,340]},"content":"算法思路:从第一个结点开始顺序依次访问表中的每一个结点,为此需要设置一个计数器变量,每访问一个结点,计算器加1,直到访问到空结点为止。","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[340,341]},"content":"时间复杂度:O(n)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[341,342]},"content":"判空条件","children":[{"type":"list_item","depth":7,"payload":{"lines":[343,344]},"content":"不带头结点的单链表L为空,判定条件是L=NULL。","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[344,345]},"content":"带头结点的单链表L为空,判空条件:L->next=NULL","children":[]}]}]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[346,347]},"content":"双链表","children":[{"type":"list_item","depth":4,"payload":{"lines":[348,349]},"content":"定义:在单链表的结点中增加了一个指向结点前驱的prior指针,由prior指针域、data数据域、next指针域三部分组成。","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[349,350]},"content":"基本特点","children":[{"type":"list_item","depth":5,"payload":{"lines":[351,352]},"content":"双链表仅仅在单链表的结点中增加了一个指向结点前驱的prior指针","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[352,353]},"content":"按值查找、按序号查找在单链表和双链表上的操作是相同的","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[353,354]},"content":"和单链表不同,插入、删除操作除了修改next指针域,双链表还需要修改prior指针域,确保不断【重要】","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[355,356]},"content":"基本操作","children":[{"type":"list_item","depth":5,"payload":{"lines":[357,358]},"content":"插入结点","children":[{"type":"list_item","depth":6,"payload":{"lines":[359,360]},"content":"第一步:s->next=p->next","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[360,361]},"content":"第二步:p->next-prior=s","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[361,362]},"content":"第三步:s->prior=p","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[362,363]},"content":"第四步:p->next=s","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[363,364]},"content":"时间复杂度:O(1)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[364,365]},"content":"注意:结点p和s的前驱、后继指针要关联清楚,第一二步必须在第四步之前完成【重要】","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[366,367]},"content":"删除结点","children":[{"type":"list_item","depth":6,"payload":{"lines":[368,369]},"content":"第一步:p->next=q->next","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[369,370]},"content":"第二步:q->next->prior=p","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[370,371]},"content":"第三步:free(q) 释放结点内存空间","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[371,372]},"content":"时间复杂度:O(1)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[372,373]},"content":"注意:删除双链表结点p的后继结点的第一二步,顺序可换,及时释放内存空间【重要】","children":[]}]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[374,375]},"content":"循环链表","children":[{"type":"list_item","depth":4,"payload":{"lines":[376,377]},"content":"循环单链表","children":[{"type":"list_item","depth":5,"payload":{"lines":[378,379]},"content":"定义:在单链表的基础上,将最后一个结点(尾结点)的指针由NULL改为指向头结点,形成。【单链表----->循环单链表】","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[379,380]},"content":"判断条件","children":[{"type":"list_item","depth":6,"payload":{"lines":[381,382]},"content":"不是判断头结点的指针是否为空,而是需要判断是否等于头指针","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[382,383]},"content":"表为空时,头结点的next指针域其实是指向自己","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[383,384]},"content":"结点的next指针指向自己,也就能判断表为空","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[385,386]},"content":"基本特点","children":[{"type":"list_item","depth":6,"payload":{"lines":[387,388]},"content":"在循环单链表中,尾结点*p的next指针域指向链表L(即:头结点),形成了闭环,不存在指针域为NULL的结点","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[388,389]},"content":"由于循环单链表是个,在任何位置上的插入、删除操作都是等价的,不需要去判断是否是表尾","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[389,390]},"content":"单链表只能从头结点(表头结点)开始往后顺序遍历整个表,循环单链表可以从表中任意位置开始遍历整个链表,结点是等价的","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[390,391]},"content":"循环单链表可以抽象为时钟,形成的是有顺序的","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[391,392]},"content":"频繁的表头表尾操作,可以对循环单链表设置尾指针,而不设置头指针,明确尾指针r后,头指针即为:r->next ,减少头指针到尾指针间的遍历,时间复杂度:O(n)---->O(1)","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[393,394]},"content":"循环双链表","children":[{"type":"list_item","depth":5,"payload":{"lines":[395,396]},"content":"定义:在双链表的基础上,将尾结点的next指针指向头结点,将头结点的prior指针指向尾结点。【双链表----->循环双链表】","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[396,397]},"content":"判空条件","children":[{"type":"list_item","depth":6,"payload":{"lines":[398,399]},"content":"循环双链表为空时,头结点*p的prior指针和next指针都指向L","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[399,400]},"content":"同时满足","children":[{"type":"list_item","depth":7,"payload":{"lines":[401,402]},"content":"p->prior=L","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[402,403]},"content":"p->next=L","children":[]}]}]},{"type":"list_item","depth":5,"payload":{"lines":[404,405]},"content":"基本特点:从双向链表中的任意一个结点开始,都可以很方便地访问它的前驱结点后继结点","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[406,407]},"content":"静态链表","children":[{"type":"list_item","depth":4,"payload":{"lines":[408,409]},"content":"定义:借助数组来描述线性表的链式存储结构,结点元素同样存在数据域data和指针域next","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[409,410]},"content":"需要注意","children":[{"type":"list_item","depth":5,"payload":{"lines":[411,412]},"content":"和普通的链表的指针域不同的是,静态链表的指针是结点元素的相对地址(数组下标),也称为游标,建议结合高级语言中数组的概念来理解;","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[412,413]},"content":"与顺序表一样,虽然静态链表属于链表,但是存储时需要预先分配一块连续的内存空间","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[413,414]},"content":"静态链表是通过数组游标来访问下一个结点元素","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[415,416]},"content":"特点","children":[{"type":"list_item","depth":5,"payload":{"lines":[417,418]},"content":"静态链表以next=-1作为结束的标志【尾结点】","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[418,419]},"content":"和动态链表相同,插入、删除操作不需要移动元素,只需要修改指针;","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[419,420]},"content":"总体来说,静态链表没有单链表使用方便,需要将整个链表存储在一块连续的内存空间中,内部的存储可以分散,通过指针构成的关系","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[421,422]},"content":"零碎知识补充","children":[{"type":"list_item","depth":4,"payload":{"lines":[423,424]},"content":"无论是链表的插入还是删除操作,必须保证不断链【重要】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[424,425]},"content":"顺序存储结构可以随机存取也能顺序存取,链式结构只能进行顺序存取","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[425,426]},"content":"顺序存储方式同样适合图和树的存储,例如:满二叉树的顺序存储","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[426,427]},"content":"队列需要在表头删除元素,在表尾插入元素【先进先出】,采用带尾指针的循环单链表比较方便","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[427,428]},"content":"静态链表中的指针称为游标,指示下一个元素在数组中的下标","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[428,429]},"content":"静态链表用数组表示,需要预先分配较大的连续空间,同时具有一般链表的特点(插入、删除元素不需要移动元素)","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[429,430]},"content":"单链表设置头结点的","children":[{"type":"list_item","depth":5,"payload":{"lines":[431,432]},"content":"目的:方便运算","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[432,433]},"content":"好处","children":[{"type":"list_item","depth":6,"payload":{"lines":[434,435]},"content":"有头结点后,插入、删除数据元素的算法统一起来了,不需要判断是否在第一个元素之前插入或者删除第一个元素了","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[435,436]},"content":"不论链表是否为空,头指针是指向头结点的非空指针,链表的头指针不变,因此空链表和非空链表的处理也就统一起来了。","children":[]}]}]}]}]},{"type":"heading","depth":2,"payload":{"lines":[437,438]},"content":"顺序表和链表的比较","children":[{"type":"list_item","depth":3,"payload":{"lines":[439,440]},"content":"存取方式","children":[{"type":"list_item","depth":4,"payload":{"lines":[441,442]},"content":"顺序表支持顺序存取和随机存取","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[442,443]},"content":"链表只能从表头顺序存取元素,支持顺序存取","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[444,445]},"content":"逻辑结构与物理结构","children":[{"type":"list_item","depth":4,"payload":{"lines":[446,447]},"content":"顺序存储时,逻辑上相邻的元素,对应的物理存储位置也相邻【一定性】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[447,448]},"content":"链式存储时,逻辑上相邻的元素,对应的物理存储位置不一定相邻【可以相邻,也可以不相邻】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[448,449]},"content":"链式存储的逻辑关系通过指针链接表示","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[450,451]},"content":"时间复杂度","children":[{"type":"list_item","depth":4,"payload":{"lines":[452,453]},"content":"按值查找","children":[{"type":"list_item","depth":5,"payload":{"lines":[454,455]},"content":"顺序表无序的情况下,顺序表和链表的时间复杂度均为O(n);","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[455,456]},"content":"顺序表有序的情况下,顺序表的时间复杂度为O(log2n),链表为O(n);","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[457,458]},"content":"按序号查找","children":[{"type":"list_item","depth":5,"payload":{"lines":[459,460]},"content":"顺序表支持随机访问,时间复杂度为O(1);","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[460,461]},"content":"顺序表不支持随机访问,时间复杂度为O(n);","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[462,463]},"content":"插入、删除","children":[{"type":"list_item","depth":5,"payload":{"lines":[464,465]},"content":"顺序表平均需要移动半个表长的元素;","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[465,466]},"content":"链表只需要修改相应结点的指针域,不需要移动元素;","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[466,467]},"content":"链表结点除了数据域,还有指针域,在存储空间上比顺序存储需要更大的存储空间,付出更大的存储代价,存储密度不够大","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[468,469]},"content":"空间分配","children":[{"type":"list_item","depth":4,"payload":{"lines":[470,471]},"content":"顺序存储","children":[{"type":"list_item","depth":5,"payload":{"lines":[472,473]},"content":"静态分配","children":[{"type":"list_item","depth":6,"payload":{"lines":[474,475]},"content":"需要预先分配足够大的存储空间","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[475,476]},"content":"空间装满后不能扩充,存储新元素将出现内存溢出","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[476,477]},"content":"存储空间过大,顺序表后部闲置空间过多,造成内部碎片","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[477,478]},"content":"存储空间过小,会造成内存溢出","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[479,480]},"content":"动态分配","children":[{"type":"list_item","depth":6,"payload":{"lines":[481,482]},"content":"能够扩充存储空间","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[482,483]},"content":"需要移动大量元素,操作效率降低","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[483,484]},"content":"内存中没有更大块的连续存储空间,将会导致空间分配失败;","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[485,486]},"content":"链式存储","children":[{"type":"list_item","depth":5,"payload":{"lines":[487,488]},"content":"结点空间只在需要的时候申请分配","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[488,489]},"content":"只要内存由空间就可以分配,操作灵活、高效","children":[]}]}]}]},{"type":"heading","depth":2,"payload":{"lines":[490,491]},"content":"存储结构选取","children":[{"type":"list_item","depth":3,"payload":{"lines":[492,493]},"content":"基于存储的考虑","children":[{"type":"list_item","depth":4,"payload":{"lines":[494,495]},"content":"对线性表的长度和存储规模难以估计时,不宜采用顺序表存储","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[495,496]},"content":"链表不用事先估计存储规模,但存储密度较低","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[496,497]},"content":"链式存储结构的存储密度小于1,不要求连续的存储空间","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[498,499]},"content":"基于运算的考虑","children":[{"type":"list_item","depth":4,"payload":{"lines":[500,501]},"content":"随机存取","children":[{"type":"list_item","depth":5,"payload":{"lines":[502,503]},"content":"顺序表支持随机存取,按序号查找顺序表的时间复杂度为O(1),相对较好","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[503,504]},"content":"链表不支持随机存取,按序号查找链表的时间复杂度为O(n)","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[505,506]},"content":"插入、删除操作","children":[{"type":"list_item","depth":5,"payload":{"lines":[507,508]},"content":"顺序表的插入、删除操作,平均需要移动表中一半的元素,当表的数据量较大时,这种情况需要重点考虑的","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[508,509]},"content":"链表的插入、删除操作,也是需要找插入位置(前驱结点、后继结点),主要的操作还是比较操作,相对较好","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[510,511]},"content":"基于环境的考虑","children":[{"type":"list_item","depth":4,"payload":{"lines":[512,513]},"content":"顺序表容易实现,任何高级语言中都有数组类型","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[513,514]},"content":"链表操作是基于指针的,指针移动,相对复杂","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[515,516]},"content":"综合结论","children":[{"type":"list_item","depth":4,"payload":{"lines":[517,518]},"content":"通常比较稳定的线性表选择顺序存储","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[518,519]},"content":"频繁进行插入、删除操作的线性表,应该选择链式存储,动态性较强","children":[]}]}]}]},{"type":"heading","depth":1,"payload":{"lines":[520,521]},"content":"栈和队列","children":[{"type":"heading","depth":2,"payload":{"lines":[522,523]},"content":"栈【后进先出】","children":[{"type":"list_item","depth":3,"payload":{"lines":[524,525]},"content":"基础概念","children":[{"type":"list_item","depth":4,"payload":{"lines":[526,527]},"content":"定义: 只允许在一端进行插入或者删除操作的线性表。","children":[{"type":"list_item","depth":5,"payload":{"lines":[528,529]},"content":"后进先出","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[529,530]},"content":"明确栈是一种线性表","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[530,531]},"content":"限定栈只能在某一端进行插入或者删除操作","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[532,533]},"content":"栈顶:线性表允许进行插入和删除的一端","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[533,534]},"content":"栈底:不允许进行插入和删除的另外一端,是固定的","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[534,535]},"content":"空栈:不含任何元素的空表,也叫栈空","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[536,537]},"content":"基本操作","children":[{"type":"list_item","depth":4,"payload":{"lines":[538,539]},"content":"InitStack(&S): 初始化一个空栈S,栈顶指针初始化为-1","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[539,540]},"content":"StackEmpty(S): 判断一个栈是否为空,如果栈空则返回true,否则返回false","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[540,541]},"content":"Push(&S,x): 进栈,若栈未满,x进栈操作,插入到栈内成为新的栈顶元素","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[541,542]},"content":"Pop(&S,&x): 出栈,若栈非空,出栈操作,弹出栈顶元素,用指针x进行返回","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[542,543]},"content":"GetTop(S,&x): 读栈顶元素,若栈S非空,用x返回栈顶元素","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[543,544]},"content":"ClearStack(&S): 销毁栈,释放栈S占用的存储空间","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[545,546]},"content":"顺序存储结构","children":[{"type":"list_item","depth":4,"payload":{"lines":[547,548]},"content":"顺序栈","children":[{"type":"list_item","depth":5,"payload":{"lines":[549,550]},"content":"定义:栈的顺序存储,利用一组地址连续的存储单元存放自栈底到栈顶的所有元素,同时附加一个用来指向当前栈顶位置的指针","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[550,551]},"content":"顺序栈S【重要,栈顶指针初始化为-1】","children":[{"type":"list_item","depth":6,"payload":{"lines":[552,553]},"content":"栈顶指针S.top","children":[{"type":"list_item","depth":7,"payload":{"lines":[554,555]},"content":"初始时,S.top=-1","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[555,556]},"content":"栈顶元素:S.data[S.top]","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[557,558]},"content":"进栈操作:栈不满时,栈顶+1,再进栈","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[558,559]},"content":"出栈操作:栈非空时,取栈顶元素,栈顶-1","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[559,560]},"content":"栈满条件:S.top=MaxSize-1","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[560,561]},"content":"栈空条件:S.top=-1","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[561,562]},"content":"栈长:S.top+1","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[562,563]},"content":"当对栈的最大使用空间估计不足时,容易出现栈上溢(外溢),需要主动向用户报告反馈,避免出现错误;","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[564,565]},"content":"栈顶指针初始化为0【更多是为-1】","children":[{"type":"list_item","depth":6,"payload":{"lines":[566,567]},"content":"入栈: S.data[S.top++]=x","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[567,568]},"content":"出栈: x=S.data[--S.top]","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[568,569]},"content":"同时, 栈空、栈满条件也会有变化","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[570,571]},"content":"基本运算","children":[{"type":"list_item","depth":6,"payload":{"lines":[572,573]},"content":"InitStack(&S): 初始化一个空栈S,栈顶指针初始化为-1","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[573,574]},"content":"StackEmpty(S): 判断一个栈是否为空,即:栈顶指针是否为-1,如果栈空则返回true,否则返回false","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[574,575]},"content":"Push(&S,x): 进栈,若栈未满,x进栈操作,插入到栈内成为新的栈顶元素。","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[575,576]},"content":"Pop(&S,&x): 出栈,若栈非空,出栈操作,弹出栈顶元素,用指针x进行返回。","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[576,577]},"content":"GetTop(S,&x): 读(获取)栈顶元素,若栈S非空,用x返回栈顶元素。","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[578,579]},"content":"共享栈","children":[{"type":"list_item","depth":5,"payload":{"lines":[580,581]},"content":"定义:利用栈底位置相对不变的特性,可以让两个顺序栈共享一个一维存储空间,将两个栈的栈底分别设置在共享空间的两端,两个栈顶则向共享空间的中间延伸","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[581,582]},"content":"基础概念","children":[{"type":"list_item","depth":6,"payload":{"lines":[583,584]},"content":"两个栈(0、1号顺序栈)的栈顶指针都指向栈顶元素","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[584,585]},"content":"0号栈栈顶指针top=-1时,0号栈为空","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[585,586]},"content":"1号栈栈顶指针top=MaxSize时,1号栈为空","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[586,587]},"content":"当且仅当两个栈的栈顶指针相邻(top1-top0=1),可以判断共享栈栈满","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[588,589]},"content":"进栈【先移动指针,后赋值】","children":[{"type":"list_item","depth":6,"payload":{"lines":[590,591]},"content":"当0号栈进栈时,0号栈栈顶指针top0先加1后赋值","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[591,592]},"content":"当1号栈进栈时,0号栈栈顶指针top1先减1后赋值","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[593,594]},"content":"出栈【先赋值,后移动指针】","children":[{"type":"list_item","depth":6,"payload":{"lines":[595,596]},"content":"当0号栈进栈时,0号栈栈顶指针top0先赋值后减1","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[596,597]},"content":"当1号栈进栈时,0号栈栈顶指针top1先赋值后加1","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[598,599]},"content":"重要特性","children":[{"type":"list_item","depth":6,"payload":{"lines":[600,601]},"content":"共享栈能够更有效的利用存储空间,两个栈空间进行相互调节","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[601,602]},"content":"只有当这个存储空间(即:共享空间)被占满时才会发生上溢","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[602,603]},"content":"共享栈对存取效率没有什么影响,存取数据的时间复杂度都为O(1),在栈顶操作。","children":[]}]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[604,605]},"content":"链式存储结构","children":[{"type":"list_item","depth":4,"payload":{"lines":[606,607]},"content":"基本概念","children":[{"type":"list_item","depth":5,"payload":{"lines":[608,609]},"content":"链栈: 采用链式存储的栈","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[609,610]},"content":"栈满:对于链栈来说,是基于链式存储的,基本不存在栈满的情况,除非内存已经没有使用空间了","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[610,611]},"content":"栈空:对于空栈来说,链表原来的定义是头指针指向空,那么链栈的空其实就是top=NULL,链栈元素总数为0","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[611,612]},"content":"通常对于链栈来说,是不需要头结点的,当然也存在带头结点的链栈","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[613,614]},"content":"基础操作【基于单链表】","children":[{"type":"list_item","depth":5,"payload":{"lines":[615,616]},"content":"入栈","children":[{"type":"list_item","depth":6,"payload":{"lines":[617,618]},"content":"如果链栈不存在,则栈满,入栈操作失败,返回false;","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[618,619]},"content":"如果链栈存在,进行单链表的结点插入操作,移动指针,结点元素赋值,再将结点压入链栈中,移动链栈栈顶指针,最后链栈元素总数+1,返回true","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[620,621]},"content":"出栈","children":[{"type":"list_item","depth":6,"payload":{"lines":[622,623]},"content":"如果链栈不存在,或者为空栈,则无法进行出栈操作,返回false","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[623,624]},"content":"如果链栈满足出栈条件,则通过栈顶指针获取到链栈栈底结点,将其数据域赋值给变量e,移动栈顶指针指向待出栈元素的后继结点,同时释放待出栈元素的内存空间,链栈元素总数-1 ,出栈成功,返回true.","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[625,626]},"content":"基于单链表的链栈入栈、出栈操作,时间复杂度都为O(1)【重要】","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[627,628]},"content":"优点","children":[{"type":"list_item","depth":5,"payload":{"lines":[629,630]},"content":"便于多个栈共享存储空间","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[630,631]},"content":"不存在栈满上溢的情况,避免程序因溢出导致出错","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[631,632]},"content":"有效的提高存取效率","children":[]}]}]}]},{"type":"heading","depth":2,"payload":{"lines":[633,634]},"content":"队列【先进先出】","children":[{"type":"list_item","depth":3,"payload":{"lines":[635,636]},"content":"基本概念","children":[{"type":"list_item","depth":4,"payload":{"lines":[637,638]},"content":"队列:和栈一样,是一种操作受限制的线性表,只允许在表的一端进行插入,在表的另外一端进行删除,简称为,常记作:Queue","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[638,639]},"content":"队头:允许进行删除操作的一端,也叫做队首,常记作:Front","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[639,640]},"content":"队尾:允许进行插入操作的一端,常记作:Rear","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[640,641]},"content":"空队列:不含任何元素的空表,注意这个表是指线性表","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[641,642]},"content":"入队: 向队列中插入元素,也叫做进队","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[642,643]},"content":"出队: 删除队列元素,也叫做离队","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[644,645]},"content":"基础操作","children":[{"type":"list_item","depth":4,"payload":{"lines":[646,647]},"content":"InitQueue(&Q): 初始化一个队列,构造空队列Q","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[647,648]},"content":"QueueEmpty(Q): 判断队列是否为空,队空返回true,否则返回false","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[648,649]},"content":"EnEmpty(&Q,x): 入队,如果队列Q未满,将x入队,成为新的队尾元素","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[649,650]},"content":"DeEmpty(&Q,&x): 出队,如果队列Q非空,删除队头元素,复制给x返回","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[650,651]},"content":"GetHead(Q,&x): 读取队头元素,如果队列Q非空,则将队头元素赋值给x","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[652,653]},"content":"顺序存储","children":[{"type":"list_item","depth":4,"payload":{"lines":[654,655]},"content":"顺序队列","children":[{"type":"list_item","depth":5,"payload":{"lines":[656,657]},"content":"队列的顺序实现是指分配一块连续的存储单元用来存放队列中的元素,并且附加两个指针","children":[{"type":"list_item","depth":6,"payload":{"lines":[658,659]},"content":"front指针: 指向队头元素的位置","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[659,660]},"content":"rear指针: 指向队尾元素的位置","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[661,662]},"content":"初始状态(队空条件):Q.front===Q.rear===0","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[662,663]},"content":"入队操作:队不满时,先赋值给队尾元素,再移动队尾指针+1","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[663,664]},"content":"出队操作: 队不空时,先取队头元素值,再移动队头指针+1","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[664,665]},"content":"Q.front===Q.rear===0,那能用Q.rear==MaxSize来表示队满嘛?【不行】","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[666,667]},"content":"循环队列","children":[{"type":"list_item","depth":5,"payload":{"lines":[668,669]},"content":"把顺序队列臆想为一个环状的空间,将存储队列元素的表从逻辑上看做为一个环","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[669,670]},"content":"初始时:Q.front=Q.rear=0","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[670,671]},"content":"队首指针进1: Q.front=(Q.front+1)%MaxSize","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[671,672]},"content":"队尾指针进1: Q.rear=(Q.rear+1)%MaxSize","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[672,673]},"content":"队列长度: (Q.rear+MaxSize-Q.front)%MaxSize","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[673,674]},"content":"除法取余运算(%)【解决顺序队列“上溢出”】问题","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[674,675]},"content":"如何区别队空还是队满?","children":[{"type":"list_item","depth":6,"payload":{"lines":[676,677]},"content":"方案一:牺牲一个单元来区分队空和队满","children":[{"type":"list_item","depth":7,"payload":{"lines":[678,679]},"content":"前提:队头指针在队尾指针在队尾指针的下一个位置作为队满标志【重要】","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[679,680]},"content":"队满条件:(Q.rear+1)%MaxSize==Q.front","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[680,681]},"content":"队空条件:Q.front==Q.rear","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[681,682]},"content":"队列中元素个数:(Q.rear+MaxSize-Q.front)%MaxSize","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[683,684]},"content":"方案二:类型中增设表示元素个数的数据成员","children":[{"type":"list_item","depth":7,"payload":{"lines":[685,686]},"content":"直接和MaxSize去比较","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[686,687]},"content":"队空条件: Q.count=0","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[687,688]},"content":"队满条件: Q.count=MaxSize","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[688,689]},"content":"【注意】不论是队空还是队满,对会存在Q.front=Q.rear,这个可以通过前面方案一解决","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[690,691]},"content":"方案三:类型中增设tag数据成员标记","children":[{"type":"list_item","depth":7,"payload":{"lines":[692,693]},"content":"通过添加tag标记的方式,区分队空还是队满","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[693,694]},"content":"tag0的情况下,如果因为删除导致Q.frontQ.rear,则队空;","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[694,695]},"content":"tag1的情况下,如果因为插入导致Q.frontQ.rear,则队满;","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[695,696]},"content":"tag的主要作用","children":[{"type":"list_item","depth":8,"payload":{"lines":[697,698]},"content":"在有元素入队的时候,设置tag=1","children":[]},{"type":"list_item","depth":8,"payload":{"lines":[698,699]},"content":"在有元素出队的时候,设置tag=0","children":[]}]}]}]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[700,701]},"content":"链式存储","children":[{"type":"list_item","depth":4,"payload":{"lines":[702,703]},"content":"链队列","children":[{"type":"list_item","depth":5,"payload":{"lines":[704,705]},"content":"链队列:和顺序队列一样,基于队列的链式表示叫做链队列,实际上为:一个同时带有队头指针和队尾指针的单链表","children":[{"type":"list_item","depth":6,"payload":{"lines":[706,707]},"content":"头指针指向队头结点","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[707,708]},"content":"尾指针指向队尾结点(单链表的最后一个结点)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[709,710]},"content":"不带头结点链式队列","children":[{"type":"list_item","depth":6,"payload":{"lines":[711,712]},"content":"队空: linkQueue.frontNULL且linkQueue.rearNULL","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[712,713]},"content":"出队: 先判断队列是否为空,非空队列则取出队头元素,从链表中闪出去,队头指针Q.front指向下一个结点,如果出队的结此为尾结点,出队后队空,需要将Q.front和Q.rear都置为NULL","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[713,714]},"content":"入队: 建立一个新的结点,将新的结点插入到链表的尾部,修改队尾指针Q.rear指向新插入的结点。如果原队列为空,需要将队首指针也指向该结点","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[714,715]},"content":"【入队、出队操作,都需要考虑队空的情况下的特殊处理,不带头结点的队列导致队空队首和队尾指针都为NULL,麻烦】","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[716,717]},"content":"带头结点的链式队列","children":[{"type":"list_item","depth":6,"payload":{"lines":[718,719]},"content":"【复杂的入队、出队操作就统一起来】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[719,720]},"content":"队空:Q.front==Q.rear,都指向头结点,一般数据域可以为空","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[720,721]},"content":"出队:判断队列是否为空,队列非空则在队首移动指针,将队首指针指向下一个元素。如果队列中就一个元素,则出队后将成为空队,Q.rear==Q.front,最后释放元素内存空间。","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[721,722]},"content":"入队:将元素插入队尾,移动队尾指针,即便为空队列入队,由于队列带有头结点,此时就很好的避免操作队首指针了。","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[722,723]},"content":"子主题 5","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[724,725]},"content":"特别注意","children":[{"type":"list_item","depth":6,"payload":{"lines":[726,727]},"content":"用单链表表示的链式队列非常适合频繁出队、入队、元素变化大的场景","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[727,728]},"content":"不存在队满情况,也不会出现溢出情况;","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[728,729]},"content":"链式队列不会出现存储分配不合理、“溢出”的情况,内存动态分配","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[730,731]},"content":"基本操作【带头结点】","children":[{"type":"list_item","depth":6,"payload":{"lines":[732,733]},"content":"队列初始化","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[733,734]},"content":"判断队空:Q.front==Q.rear","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[734,735]},"content":"入队【重要】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[735,736]},"content":"出队【重要】","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[737,738]},"content":"双端队列","children":[{"type":"list_item","depth":5,"payload":{"lines":[739,740]},"content":"允许在两端都可以进行入队和出队操作的队列,元素的逻辑结构仍然是线性结构","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[740,741]},"content":"双端队列的两端分别称为前端和后端,两端都可以入队和出队","children":[{"type":"list_item","depth":6,"payload":{"lines":[742,743]},"content":"进队:前端进的元素排列在队列中后端进的元素的前面,后端进的元素排列在队列前端进的元素后面;","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[743,744]},"content":"出队:无论是前端还是后端出队,先出的的元素排列在后出的元素的前面","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[745,746]},"content":"输入受限的双端队列:允许在一端进行插入和删除操作,但在另外一端只允许进行删除的双端队列","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[746,747]},"content":"输出受限的双端队列:允许在一端进行插入和删除曹组,但在另外一端只允许进行插入的双端队列","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[748,749]},"content":"如果限定双端队列从某个断点插入的元素只能从该端点删除,那么此时的双端队列就演变为两个栈底相邻的栈","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[750,751]},"content":"补充","children":[{"type":"list_item","depth":5,"payload":{"lines":[752,753]},"content":"最适合用来链队的链表是:带队首指针和队尾指针的非循环单链表","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[753,754]},"content":"栈和队列的逻辑结构都是线性表,存储结构可能是顺序的(顺序栈、顺序队列),也可能是链式的(链栈、链队)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[754,755]},"content":"不论是顺序存储还是链式存储,栈和队列都只能进行顺序存取(本质是线性表)。数组是可以做到随机存取(本质是顺序表)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[755,756]},"content":"队列先进先出的特性:先进队列的元素先出队列,后进队列的元素后出队列","children":[]}]}]}]},{"type":"heading","depth":2,"payload":{"lines":[757,758]},"content":"应用","children":[{"type":"list_item","depth":3,"payload":{"lines":[759,760]},"content":"【栈】括号匹配","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[760,761]},"content":"【栈】表达式求值","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[761,762]},"content":"【栈】递归算法","children":[{"type":"list_item","depth":4,"payload":{"lines":[763,764]},"content":"定义: 如果在一个函数、过程或数据结构的定义中又应用了自身,那么这个函数、过程或者数据结构称为递归定义的,简称递归。","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[764,765]},"content":"递归通常把一个大型的复杂问题,层层转化为一个与原问题相似的规模较小的问题来求解","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[765,766]},"content":"斐波拉切数列算法优化","children":[{"type":"list_item","depth":5,"payload":{"lines":[767,768]},"content":"使用非递归实现","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[768,769]},"content":"使用空间换效率,例如:数组","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[769,770]},"content":"使用缓存,存放数据","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[771,773]},"content":"必须注意递归模型不能是循环定义,
\n需要满足两个条件","children":[{"type":"list_item","depth":5,"payload":{"lines":[774,775]},"content":"递归表达式(递归体)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[775,776]},"content":"边界条件(递归出口),即:算法结束条件","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[777,778]},"content":"特点","children":[{"type":"list_item","depth":5,"payload":{"lines":[779,780]},"content":"很大程度上减少了程序的代码量","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[780,781]},"content":"算法效率不高【重要特点】","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[781,782]},"content":"调用次数过多容易造成栈溢出","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[783,784]},"content":"【队列】层次遍历","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[784,785]},"content":"【队列】计算机系统","children":[{"type":"list_item","depth":4,"payload":{"lines":[786,787]},"content":"解决主机和外部设备之间速度不匹配的问题","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[787,788]},"content":"解决由多用户引起的资源竞争问题","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[789,790]},"content":"特殊矩阵的压缩存储","children":[{"type":"list_item","depth":3,"payload":{"lines":[791,792]},"content":"在计算机图形学工程计算中占有举足轻重的地位。","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[792,793]},"content":"数组定义:由n(n≥1)个相同类型的数据元素构成的有限序列。","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[793,794]},"content":"重要概念","children":[{"type":"list_item","depth":4,"payload":{"lines":[795,796]},"content":"【压缩存储】多个值相同的元素只分配一个存储空间,对零元素不分配存储空间---->节省存储空间。","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[796,797]},"content":"【特殊矩阵】具有很多相同矩阵元素或零元素,并且这些相同矩阵元素或零元素的分布有一定规律性的矩阵。","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[797,798]},"content":"【稀疏矩阵】矩阵元素个数s相对于矩阵中非零元素的个数t来说非常多、差距非常大,即s>>t的矩阵可以叫稀疏矩阵","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[799,800]},"content":"常见的特殊矩阵","children":[{"type":"list_item","depth":4,"payload":{"lines":[801,802]},"content":"对称矩阵","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[802,803]},"content":"上、下三角矩阵","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[803,804]},"content":"对角矩阵(带状矩阵)","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[804,805]},"content":"......","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[806,807]},"content":"注意","children":[{"type":"list_item","depth":4,"payload":{"lines":[808,809]},"content":"常规方法来存储稀疏矩阵,会想当浪费存储空间,所以稀疏矩阵只需要存储非零元素","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[809,810]},"content":"通常非零元素的分布是没有规律的,除了存储非零元素外,还需要存储元素所在位置的行和列","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[810,811]},"content":"寻相互存储三元组 <行标,列表,值>","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[811,812]},"content":"三元组的结点存储了行标(row)、列表(col)、值(value)三种信息,是主要用来存储稀疏矩阵的一种数据结构","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[813,814]},"content":"数组和线性表的关系","children":[{"type":"list_item","depth":4,"payload":{"lines":[815,816]},"content":"数组是线性表的推广","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[816,817]},"content":"数组一旦被定义,维数和维界就不再改变","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[817,818]},"content":"除了结构的初始化和销毁外,数组只会有存取元素和修改元素的操作","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[819,820]},"content":"数组的存储结构","children":[{"type":"list_item","depth":4,"payload":{"lines":[821,822]},"content":"按行优先","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[822,823]},"content":"按列优先","children":[]}]}]}]},{"type":"heading","depth":1,"payload":{"lines":[824,825]},"content":"树与二叉树","children":[{"type":"heading","depth":2,"payload":{"lines":[826,827]},"content":"树","children":[{"type":"list_item","depth":3,"payload":{"lines":[828,829]},"content":"定义","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[829,830]},"content":"术语","children":[{"type":"list_item","depth":4,"payload":{"lines":[831,832]},"content":"结点","children":[{"type":"list_item","depth":5,"payload":{"lines":[833,834]},"content":"祖先结点","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[834,835]},"content":"父子结点","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[835,836]},"content":"兄弟结点","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[836,837]},"content":"孩子结点","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[837,838]},"content":"子孙结点","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[838,839]},"content":"分支结点","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[839,840]},"content":"叶子结点(终端结点)","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[841,842]},"content":"度","children":[{"type":"list_item","depth":5,"payload":{"lines":[843,844]},"content":"结点的度","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[844,845]},"content":"树的度","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[846,847]},"content":"结点的深度、高度、层次","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[847,848]},"content":"有序树和无序树","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[848,849]},"content":"路径和路径长度","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[849,850]},"content":"森林","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[851,852]},"content":"性质","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[853,854]},"content":"二叉树","children":[{"type":"list_item","depth":3,"payload":{"lines":[855,856]},"content":"定义和特性","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[856,857]},"content":"存储结构","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[857,858]},"content":"二叉树遍历","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[858,859]},"content":"线索二叉树","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[860,861]},"content":"树和森林","children":[{"type":"list_item","depth":3,"payload":{"lines":[862,863]},"content":"存储结构","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[863,864]},"content":"树、森林与二叉树转换","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[864,865]},"content":"遍历","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[865,866]},"content":"并查集应用","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[867,868]},"content":"应用","children":[{"type":"list_item","depth":3,"payload":{"lines":[869,870]},"content":"二叉排序树","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[870,871]},"content":"平衡二叉树","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[871,872]},"content":"哈夫曼树","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[872,873]},"content":"哈夫曼编码","children":[]}]}]},{"type":"heading","depth":1,"payload":{"lines":[874,875]},"content":"图论","children":[{"type":"heading","depth":2,"payload":{"lines":[876,877]},"content":"定义","children":[]},{"type":"heading","depth":2,"payload":{"lines":[878,879]},"content":"基本操作","children":[{"type":"list_item","depth":3,"payload":{"lines":[880,881]},"content":"Adjacent(G,x,y)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[881,882]},"content":"Neighbors(G,x)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[882,883]},"content":"InsertVertex(G,x)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[883,884]},"content":"DeleteVertex(G,x)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[884,885]},"content":"AddEdge(G,x,y)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[885,886]},"content":"RemoveEdge(G,x,y)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[886,887]},"content":"FirstNeighbor(G,x)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[887,888]},"content":"NextNeighbor(G,x,y)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[888,889]},"content":"Get_edge_value(G,x,y)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[889,890]},"content":"Set_edge_value(G,x,y,v)","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[891,892]},"content":"存储及操作","children":[{"type":"list_item","depth":3,"payload":{"lines":[893,894]},"content":"邻接矩阵法","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[894,895]},"content":"邻接链表法","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[895,896]},"content":"十字链表","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[896,897]},"content":"邻接多重表","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[898,899]},"content":"图的遍历","children":[{"type":"list_item","depth":3,"payload":{"lines":[900,901]},"content":"广度优先搜索(BFS)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[901,902]},"content":"深度优先搜索(DFS)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[902,903]},"content":"连通性","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[904,905]},"content":"图的应用","children":[{"type":"list_item","depth":3,"payload":{"lines":[906,907]},"content":"最小生成树(MST)","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[907,908]},"content":"最短路径","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[908,909]},"content":"拓扑排序","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[909,910]},"content":"关键路劲","children":[]}]}]},{"type":"heading","depth":1,"payload":{"lines":[911,912]},"content":"查找","children":[{"type":"heading","depth":2,"payload":{"lines":[913,914]},"content":"基本概念","children":[{"type":"list_item","depth":3,"payload":{"lines":[915,916]},"content":"查找:在数据集合中寻找满足某种条件的数据元素的过程","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[916,917]},"content":"查找表(查找结构):用于查找的数据集合","children":[{"type":"list_item","depth":4,"payload":{"lines":[918,919]},"content":"数据元素(记录)的类型相同","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[919,920]},"content":"可以是一个数组或者链表等数据类型","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[920,921]},"content":"常见操作","children":[{"type":"list_item","depth":5,"payload":{"lines":[922,923]},"content":"查询某个特定元素是否存在","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[923,924]},"content":"检索满足条件的特定元素的各种属性","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[924,925]},"content":"数据元素插入","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[925,926]},"content":"数据元素删除","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[927,928]},"content":"静态查找表:不需要动态地修改查找表,与动态查找表对应","children":[{"type":"list_item","depth":4,"payload":{"lines":[929,930]},"content":"顺序查找","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[930,931]},"content":"折半查找","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[931,932]},"content":"散列查找","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[932,933]},"content":"....","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[934,935]},"content":"动态查找表:需要动态地插入或者删除的查找表","children":[{"type":"list_item","depth":4,"payload":{"lines":[936,937]},"content":"二叉排序树的查找","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[937,938]},"content":"散列查找","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[938,939]},"content":"....","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[940,941]},"content":"关键字:数据元素中唯一标识该元素的某个数据项的值","children":[{"type":"list_item","depth":4,"payload":{"lines":[942,943]},"content":"使用关键字查找,查找结果应该是【唯一的】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[943,944]},"content":"可以类比集合中不重复的key","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[944,945]},"content":"是不是想起了数据库的主键的概念????","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[946,947]},"content":"平均查找长度:所有查找过程中进行关键字的比较次数的平均值","children":[{"type":"list_item","depth":4,"payload":{"lines":[948,949]},"content":"查找长度:一次查找需要比较的关键字次数","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[949,950]},"content":"【是衡量查找算法效率的最主要的指标】","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[951,952]},"content":"顺序查找(线性查找)","children":[{"type":"list_item","depth":3,"payload":{"lines":[953,954]},"content":"主要用于在线性表中进行查找","children":[{"type":"list_item","depth":4,"payload":{"lines":[955,956]},"content":"一般的【无序线性表】的顺序查找","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[956,957]},"content":"按关键字【有序的顺序表】的顺序查找","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[957,958]},"content":"Tips:顺序表是指顺序存储的线性表,前面的有序才强调元素有序,顺序强调的是存储方式","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[959,960]},"content":"基于一般线性表的顺序查找","children":[{"type":"list_item","depth":4,"payload":{"lines":[961,962]},"content":"最直观的查找方式","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[962,963]},"content":"基本思想:从线性表的一端开始,逐个查询条件和关键字进行比对即可","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[963,964]},"content":"【重要】:哨兵的引入,可以避免很多不必要的判断语句,提高程序的效率","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[964,965]},"content":"平均查找长度","children":[{"type":"list_item","depth":5,"payload":{"lines":[966,967]},"content":"查找成功","children":[{"type":"list_item","depth":6,"payload":{"lines":[968,969]},"content":"第i个元素需要进行(n-i+1)次关键字比较","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[969,970]},"content":"概率相等的情况下:(n+1)/2","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[971,972]},"content":"查找失败【没有找到元素】","children":[{"type":"list_item","depth":6,"payload":{"lines":[973,974]},"content":"各关键字比较次数:(n+1)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[974,975]},"content":"平均查找长度:(n+1)","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[976,977]},"content":"综合分析","children":[{"type":"list_item","depth":5,"payload":{"lines":[978,979]},"content":"【缺点】:n较大时,平均查找长度较大,效率低","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[979,980]},"content":"【优点】:对数据元素的存储没有要求,顺序存储和链式存储都可行。对数据元素的有序性也没有要求","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[980,981]},"content":"【注意】:线性的链表只能进行顺序查找","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[982,983]},"content":"通常情况下,查找表中记录的查找概率并不相等","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[984,985]},"content":"基于有序表的顺序查找","children":[{"type":"list_item","depth":4,"payload":{"lines":[986,987]},"content":"预先已经知道表是按照关键字有序的,基于【二叉判定树】来查找,不用全部遍历----->【降低顺序查找失败的平均查找长度】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[987,988]},"content":"平均查找长度","children":[{"type":"list_item","depth":5,"payload":{"lines":[989,990]},"content":"查找成功","children":[{"type":"list_item","depth":6,"payload":{"lines":[991,992]},"content":"和一般线性表的顺序查找一样","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[992,993]},"content":"概率相等的情况下:(n+1)/2","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[994,995]},"content":"查找失败","children":[{"type":"list_item","depth":6,"payload":{"lines":[996,997]},"content":"到达是失败结点所查找的长度=失败结点父结点所在的层数【建议画画二叉判定树】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[997,998]},"content":"查找概率相等时,平均查找长度:n/2 + n/(n+1)","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[999,1000]},"content":"【注意】:有序表的顺序查找中的线性表可以是链式存储结构的","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[1001,1002]},"content":"折半查找(二分查找)","children":[{"type":"list_item","depth":3,"payload":{"lines":[1003,1004]},"content":"【注意】仅仅适用于有序的顺序表","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1004,1005]},"content":"基本思想:首先与表中间位置元素的关键字比较,相等则查找成功,不相等则向左|向右继续与该部分中间元素比较......","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1005,1006]},"content":"核心思路:左右双指针,互相往中间靠拢,可以用二叉判定树来辅助思考","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1006,1007]},"content":"平均查找长度【计算非常重要】","children":[{"type":"list_item","depth":4,"payload":{"lines":[1008,1009]},"content":"查找成功","children":[{"type":"list_item","depth":5,"payload":{"lines":[1010,1011]},"content":"折半查找法查到给定值的比较次数最多不会超过【判定树】的高度","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1011,1012]},"content":"相等概率下,平均查找长度约等于log2(n+1) -1 ,【建议结合二叉树高度计算来理解】","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1013,1014]},"content":"查找失败直接看例题.....","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1015,1016]},"content":"综合分析","children":[{"type":"list_item","depth":4,"payload":{"lines":[1017,1018]},"content":"折半查找的时间复杂度为O(log2n), 平均情况下笔顺序查找O(n)的效率高","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1018,1019]},"content":"折半查找需要方便地定位查找区域---->存储结构必须具有【随机存取】的特性","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1019,1020]},"content":"【注意】仅仅适用于有序的顺序表,不适用链式存储结构,要求表按关键字有序排列","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[1021,1022]},"content":"分块查找(索引顺序查找)","children":[{"type":"list_item","depth":3,"payload":{"lines":[1023,1024]},"content":"具备顺序查找和折半查找的优点,既有动态结构,又能适用于快速查找","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1024,1025]},"content":"是不是有点【希尔排序】和【直接插入排序、折半插入排序】的发展效果?????","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1025,1026]},"content":"基本思想:查找表分成若干个子块","children":[{"type":"list_item","depth":4,"payload":{"lines":[1027,1028]},"content":"块内元素可以无序,【块之间必须有序】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1028,1029]},"content":"前一块的最大关键字永远小于后一块的最小关键字","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1029,1030]},"content":"【重要】:建立索引表,包含每个分块额最大关键字和第一个元素的地址(起始角标)","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1030,1031]},"content":"索引表按关键字有序排列","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1032,1033]},"content":"查找方式","children":[{"type":"list_item","depth":4,"payload":{"lines":[1034,1035]},"content":"索引表:顺序查找或者折半查找","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1035,1036]},"content":"块内:顺序查找<----- 块内可以无序","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1037,1038]},"content":"【直接看书】平均查找长度=索引查找平均长度+块内查找的平均长度","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[1039,1040]},"content":"【直接看书|视频,这部分我很迷糊】B树和B+树","children":[{"type":"list_item","depth":3,"payload":{"lines":[1041,1042]},"content":"B树(多路平衡查找树)","children":[{"type":"list_item","depth":4,"payload":{"lines":[1043,1044]},"content":"基础概念","children":[{"type":"list_item","depth":5,"payload":{"lines":[1045,1046]},"content":"阶:所有结点的孩子结点数的最大值","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1046,1047]},"content":"m阶B树(可能为空树)满足","children":[{"type":"list_item","depth":6,"payload":{"lines":[1048,1049]},"content":"树中每个结点至多有m棵子树(即至多包含m-1个关键字)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1049,1050]},"content":"如果根结点不是终端结点,至少有两棵子树","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1050,1051]},"content":"所有的叶结点都出现在同一个层次上,不带任何信息","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1051,1052]},"content":"....","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1053,1054]},"content":"B树是所有结点的平衡因子均为0的多路查找树","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1055,1056]},"content":"基本操作","children":[{"type":"list_item","depth":5,"payload":{"lines":[1057,1058]},"content":"高度","children":[{"type":"list_item","depth":6,"payload":{"lines":[1059,1060]},"content":"B树的大部分操作需要的磁盘存取次数和B树的高度成正比","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1060,1061]},"content":"B树的高度不包括最后的不带任何信息的叶结点所处的那一层【有的参考书,也包含这部分】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1061,1062]},"content":"【重要】如果每个结点重点额关键字个数达到最少,则容纳同样多关键字的B树的高度可以达到最大","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1062,1063]},"content":"....","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1064,1065]},"content":"查找","children":[{"type":"list_item","depth":6,"payload":{"lines":[1066,1067]},"content":"步骤","children":[{"type":"list_item","depth":7,"payload":{"lines":[1068,1069]},"content":"在B树中找结点【磁盘中进行】","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1069,1070]},"content":"在结点内找关键字【内存中进行】----> 采用【顺序查找法】或【折半查找法】","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1070,1071]},"content":"【Tips】B树常存储在磁盘上,在磁盘上找到目标节点后,将结点中的信息读入到内存","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[1072,1073]},"content":"当查找到叶子结点,对应的指针为空指针,即树中没有对应的关键字","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1074,1075]},"content":"插入","children":[{"type":"list_item","depth":6,"payload":{"lines":[1076,1077]},"content":"插入操作比查找操作复杂多","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1077,1078]},"content":"步骤","children":[{"type":"list_item","depth":7,"payload":{"lines":[1079,1080]},"content":"定位","children":[{"type":"list_item","depth":8,"payload":{"lines":[1081,1082]},"content":"B树查找算法--->最底层中某个非叶结点","children":[]},{"type":"list_item","depth":8,"payload":{"lines":[1082,1083]},"content":"【重要】B树的插入关键字一定是插入到最底层的某个非叶结点内","children":[]}]},{"type":"list_item","depth":7,"payload":{"lines":[1084,1085]},"content":"插入","children":[{"type":"list_item","depth":8,"payload":{"lines":[1086,1087]},"content":"插入结点关键字个数小于m----> 直接插入","children":[]},{"type":"list_item","depth":8,"payload":{"lines":[1087,1088]},"content":"插入后检查插入结点内关键字个数,【大于m-1必须进行分裂】","children":[]}]},{"type":"list_item","depth":7,"payload":{"lines":[1089,1090]},"content":"【直接看书】】注意分裂的方法","children":[]}]}]},{"type":"list_item","depth":5,"payload":{"lines":[1091,1092]},"content":"删除(删除的关键字在终端结点)","children":[{"type":"list_item","depth":6,"payload":{"lines":[1093,1094]},"content":"直接删除关键字","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1094,1095]},"content":"兄弟够借","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1095,1096]},"content":"兄弟不够借","children":[]}]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[1097,1098]},"content":"B+树的概念","children":[{"type":"list_item","depth":4,"payload":{"lines":[1099,1100]},"content":"B+树是根据数据库的需要需要的一中B树的变形树","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1100,1101]},"content":"m阶的B+树需要满足的条件","children":[{"type":"list_item","depth":5,"payload":{"lines":[1102,1103]},"content":"每个分支结点最多有m棵子树(子结点)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1103,1104]},"content":"结点的字树个数与关键字相等","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1104,1105]},"content":"非叶、根结点至少有两棵子树,其他分支结点至少有m/2(向上取整)棵子树","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1105,1106]},"content":"所有叶结点包含全部关键字及指向相应记录的指针","children":[{"type":"list_item","depth":6,"payload":{"lines":[1107,1108]},"content":"叶结点按关键字大小排列","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1108,1109]},"content":"相邻结点按大小顺序相互链接起来","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1110,1111]},"content":"【反复理解】所有的分支结点(理解为索引的索引)中仅仅包含它的各个子结点(下一级的索引快)中关键字的最大值和指向其子结点的指针","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1111,1112]},"content":"....","children":[]}]}]}]},{"type":"heading","depth":2,"payload":{"lines":[1113,1114]},"content":"散列(Hash)表","children":[{"type":"list_item","depth":3,"payload":{"lines":[1115,1116]},"content":"基本概念","children":[{"type":"list_item","depth":4,"payload":{"lines":[1117,1118]},"content":"散列函数:一个把查找表中的关键字映射成该关键字对应的地址(数组下标、索引、内存地址等)的函数","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1118,1119]},"content":"散列冲突:散列函数把两个或者多个不同关键字映射到同一个地址上,【冲突总是不可避免的】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1119,1120]},"content":"同义词:发生散列冲突(碰撞)的不同关键字","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1120,1121]},"content":"散列表:根据关键字直接访问的数据结构,是关键字和存储地址之间的一种直接映射关系","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1121,1122]},"content":"理想情况下,散列表中查找时间复杂度为O(1),与元素个数无关","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1122,1123]},"content":"基于【比较】的查找算法,查找效率取决于比较的次数","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1123,1124]},"content":"以上可以结合哈希加密、布隆过滤器等工作中的编程概念去比对学习....","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1125,1126]},"content":"散列函数","children":[{"type":"list_item","depth":4,"payload":{"lines":[1127,1128]},"content":"构造散列函数,需要注意","children":[{"type":"list_item","depth":5,"payload":{"lines":[1129,1130]},"content":"散列函数的定义域【必须】要包含全部需要存储的关键字,值域的范围则依赖于散列表的大小或地址范围","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1130,1131]},"content":"散列函数计算出来的地址应该能【等概率、均匀的】分布在整个存储空间,尽可能减少散列冲突---> 【压测】","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1131,1132]},"content":"散列函数应该尽量简单,能够在较短时间内就计算出任一关键字对应的散列地址","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1133,1134]},"content":"常用散列函数","children":[{"type":"list_item","depth":5,"payload":{"lines":[1135,1136]},"content":"直接定址法","children":[{"type":"list_item","depth":6,"payload":{"lines":[1137,1138]},"content":"直接去关键字的某个【线性函数值】为散列函数","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1138,1139]},"content":"优点","children":[{"type":"list_item","depth":7,"payload":{"lines":[1140,1141]},"content":"计算简单","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1141,1142]},"content":"【不会产生冲突】","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1142,1143]},"content":"适合关键字的分布【基本连续】的情况","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[1144,1145]},"content":"缺点:关键字分布不连续时,空位较多,将造成存储空间的浪费","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1146,1147]},"content":"除留余数法","children":[{"type":"list_item","depth":6,"payload":{"lines":[1148,1149]},"content":"最简单、最常用的散列方法","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1149,1150]},"content":"关键在于【选择被除数P】,等概率进行映射,尽可能减少冲突的可能性","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1151,1152]},"content":"数字分析法","children":[{"type":"list_item","depth":6,"payload":{"lines":[1153,1154]},"content":"适用于已知的关键字集合","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1154,1155]},"content":"如果更换了关键字,就需要重新构造新的散列函数","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1156,1157]},"content":"平方取中法","children":[{"type":"list_item","depth":6,"payload":{"lines":[1158,1159]},"content":"取关键字的平方值的中间几位来作为散列地址","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1159,1160]},"content":"适用于关键字的每一位取值都不够均匀或小于散列地址所需要的位数","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1161,1162]},"content":"折叠法","children":[{"type":"list_item","depth":6,"payload":{"lines":[1163,1164]},"content":"将关键字分割成位数相同的几部分,取这几部分的叠加作为散列地址","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1164,1165]},"content":"关键字位数很多,每一位上数字分布大致均匀时,可以采用折叠法得到散列地址","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1166,1167]},"content":".....","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1168,1169]},"content":"不同的情况,不同的散列函数会发挥不同的性能,无法笼统的说那种散列函数最好。散列函数的目标都是为了将产生冲突的可能性尽可能地降低","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1170,1171]},"content":"处理冲突","children":[{"type":"list_item","depth":4,"payload":{"lines":[1172,1173]},"content":"【任何设计出来的散列函数都不可能绝对地避免冲突】,必须考虑在发生冲突时如何进行处理","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1173,1174]},"content":"处理方法","children":[{"type":"list_item","depth":5,"payload":{"lines":[1175,1176]},"content":"开放定址法","children":[{"type":"list_item","depth":6,"payload":{"lines":[1177,1178]},"content":"概念:可以存放新表项的空闲地址,既向它的同义词表项开放,也向它的非同义词表项开放","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1178,1179]},"content":"增量取值方法","children":[{"type":"list_item","depth":7,"payload":{"lines":[1180,1181]},"content":"线性探测法","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1181,1182]},"content":"平方探测法","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1182,1183]},"content":"再散列法(双散列法)","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1183,1184]},"content":"伪随机序列法","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[1185,1186]},"content":"注意事项","children":[{"type":"list_item","depth":7,"payload":{"lines":[1187,1188]},"content":"不能随便【物理删除】表中已有元素,删除将会截断具有相同散列地址元素的查找地址,牵涉元素广","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1188,1189]},"content":"删除元素需要【单独做标记】,采用【逻辑删除】","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1189,1190]},"content":"逻辑删除会导致散列表表面上看上满的,实际上很多位置都是没有被利用的,【需要定期维护,将删除标记的\b元素物理删除】","children":[]}]}]},{"type":"list_item","depth":5,"payload":{"lines":[1191,1192]},"content":"拉链(链接)法","children":[{"type":"list_item","depth":6,"payload":{"lines":[1193,1194]},"content":"概念:为避免非同义词发生冲突,可以把所有的同义词存储在一个线性链表中【由散列地址唯一标识】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1194,1195]},"content":"【重要】适用于经常进行插入和删除的情况","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1196,1197]},"content":"拉链法处理冲突时不存在聚集现象,用线性探测法处理冲突时容易产生聚集现象","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[1198,1199]},"content":"性能分析","children":[{"type":"list_item","depth":4,"payload":{"lines":[1200,1201]},"content":"装填因子:一个表的装满程度 =(表中的记录数)/ (散列表的长度)","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1201,1202]},"content":"查找效率取决于","children":[{"type":"list_item","depth":5,"payload":{"lines":[1203,1204]},"content":"散列函数","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1204,1205]},"content":"处理冲突的方法","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1205,1206]},"content":"【重要】装填因子","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1207,1208]},"content":"散列表的平均查找长度依赖于【散列表的填装因子】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1208,1209]},"content":"填装因子越大,表示装填的越“满”,发生冲突的可能性就越大","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1209,1210]},"content":"散列冲突导致散列表在查找过程中也是需要进行比较的。【查找效率仍然用平均查找长度来度量】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1210,1211]},"content":"冲突的产生概率与装填因子(表中记录数和表长)的大小成正比","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[1212,1213]},"content":"模式匹配(字符串)","children":[{"type":"list_item","depth":3,"payload":{"lines":[1214,1215]},"content":"简单模式匹配","children":[{"type":"list_item","depth":4,"payload":{"lines":[1216,1217]},"content":"概念:第一个字符串(模式串)在第二串(主串)中的位置","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1217,1218]},"content":"基本过程:从主串指定字符开始(一般第一个)和模式串的第一个字符逐个比较....","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1218,1219]},"content":"时间复杂度:O(n*m),n、m分别为主串和模式串的长度","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1220,1221]},"content":"【难点,直接看代码理解】KMP算法","children":[{"type":"list_item","depth":4,"payload":{"lines":[1222,1223]},"content":"【重要】是对简单模式匹配的改造,时间复杂度在O(n+m)的数量集上","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1223,1224]},"content":"【建议手动模拟】基本过程","children":[{"type":"list_item","depth":5,"payload":{"lines":[1225,1226]},"content":"整个匹配过程,没有进行指针回溯","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1226,1227]},"content":"每趟比较过程让子串向后滑动到一个合适位置, 让这个位置上的字符和主串中的那个字符比较","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1227,1228]},"content":"【重要】next数组的求解实际是对某个位置找到最长的公共前缀","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[1229,1230]},"content":"总结比较","children":[{"type":"list_item","depth":4,"payload":{"lines":[1231,1232]},"content":"简单模式匹配时间复杂度:O(n*m)","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1232,1233]},"content":"KMP算法的时间复杂度为O(n+m)","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1233,1234]},"content":"一般情况下,简单模式匹配的实际执行时间可以近似到O(n+m)","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1234,1235]},"content":"【重要】KMP算法的重要特点是主串指针不回溯","children":[]}]}]}]},{"type":"heading","depth":1,"payload":{"lines":[1236,1237]},"content":"排序","children":[{"type":"heading","depth":2,"payload":{"lines":[1238,1239]},"content":"基本概念和定义","children":[{"type":"list_item","depth":3,"payload":{"lines":[1240,1241]},"content":"排序:重新排列表中的元素,让表中的元素能够满足按照关键字递增或者递减的过程","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1241,1242]},"content":"算法的稳定性【非常重要】","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1242,1243]},"content":"排序算法是否具有稳定性并不能衡量一个算法的优劣【重要】","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1243,1244]},"content":"内部排序:在排序期间元素全部存放在内存中的排序","children":[{"type":"list_item","depth":4,"payload":{"lines":[1245,1246]},"content":"关键字比较","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1246,1247]},"content":"移动元素","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1247,1248]},"content":"不是所有的内部排序算法都是基于比较操作的,例如:基数排序属于内部排序算法,但不是基于比较实现的","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1249,1250]},"content":"外部排序:在排序期间元素无法全部同时存放在内存中,必须在排序的过程中根据要求不断地在内、外存之间移动的排序。","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[1251,1252]},"content":"插入排序","children":[{"type":"list_item","depth":3,"payload":{"lines":[1253,1254]},"content":"基本思想:每次将一个待排序的记录,按关键字大小插入到前面已经排序好的子序列中,直到全部记录插入完成","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1254,1255]},"content":"直接插入排序","children":[{"type":"list_item","depth":4,"payload":{"lines":[1256,1257]},"content":"最简单、最直观的插入排序算法","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1257,1258]},"content":"性能分析","children":[{"type":"list_item","depth":5,"payload":{"lines":[1259,1260]},"content":"空间效率:仅仅使用到了常数个辅助单元,空间复杂度为O(1)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1260,1261]},"content":"时间效率:排序过程中,需要向左侧有序子表中逐个插入元素,操作n-1次,每次操作都分为关键字比较和元素移动这两部分的次数非常依赖于待排序表的初始状态【重要】","children":[{"type":"list_item","depth":6,"payload":{"lines":[1262,1263]},"content":"最好的情况:元素已经有序,每个元素之需要比较一次,不用移动元素,O(n)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1263,1264]},"content":"最坏的情况:元素逆序,比较多次,移动多次,O(n^2)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1264,1266]},"content":"平均情况:总的比较次数和总的移动次数均约等于为(n^2)/4
\n​","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1267,1268]},"content":"稳定性: 【稳定】的排序算法","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1268,1269]},"content":"适用性","children":[{"type":"list_item","depth":6,"payload":{"lines":[1270,1271]},"content":"顺序存储的线性表","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1271,1272]},"content":"链式存储的线性表","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1272,1273]},"content":"大部分排序算法都仅仅适用于顺序存储的线性表【重要】","children":[]}]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[1274,1275]},"content":"折半插入排序","children":[{"type":"list_item","depth":4,"payload":{"lines":[1276,1277]},"content":"简述","children":[{"type":"list_item","depth":5,"payload":{"lines":[1278,1279]},"content":"直接插入:边比较边移动","children":[{"type":"list_item","depth":6,"payload":{"lines":[1280,1281]},"content":"确定插入位置","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1281,1282]},"content":"腾出空间,元素复制到插入位置","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1283,1284]},"content":"折半插入:先比较再统一移动","children":[{"type":"list_item","depth":6,"payload":{"lines":[1285,1286]},"content":"确定好待插入的位置后,再统一地向后移动元素","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[1287,1288]},"content":"性能分析","children":[{"type":"list_item","depth":5,"payload":{"lines":[1289,1290]},"content":"折半插入排序的比较次数与待排序表的初始状态无关,仅仅取决于表中的元素个数n","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1290,1291]},"content":"移动元素的次数相比直接插入排序没有任何的改变","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1291,1292]},"content":"直接插入排序和折半插入排序的比较次数一样,依赖于排序表的初始状态","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1292,1293]},"content":"时间复杂度:O(n^2)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1293,1294]},"content":"稳定性:【稳定】的排序算法","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[1295,1296]},"content":"希尔排序(缩小增量排序)","children":[{"type":"list_item","depth":4,"payload":{"lines":[1297,1298]},"content":"基本思想:将待排序表分割成为若干个L[i,i+d,i+2d,....,i+kd]的子表,分别进行直接插入排序,当整个表元素“基本有序”的时候,再对全体记录进行一次直接插入排序","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1298,1299]},"content":"基本实现步骤","children":[{"type":"list_item","depth":5,"payload":{"lines":[1300,1301]},"content":"第一步:取一个小于n的步长d1 ,把待排序的表分成d1个组,所有距离为d1的倍数的记录放在同一个组中,对各组进行直接插入排序","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1301,1302]},"content":"第二步:取第二个步长d2 < d1,重复第一步","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1303,1304]},"content":"主要操作","children":[{"type":"list_item","depth":5,"payload":{"lines":[1305,1306]},"content":"确认步长,分组","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1306,1307]},"content":"对分组元素进行直接插入排序","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1308,1309]},"content":"性能分析","children":[{"type":"list_item","depth":5,"payload":{"lines":[1310,1311]},"content":"空间效率:仅仅使用到了常数个辅助单元,O(1)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1311,1312]},"content":"时间效率","children":[{"type":"list_item","depth":6,"payload":{"lines":[1313,1314]},"content":"直接插入排序","children":[{"type":"list_item","depth":7,"payload":{"lines":[1315,1316]},"content":"是顺序的,时间复杂度最最小,O(n)","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1316,1317]},"content":"是逆序的,时间复杂度最大,O(n^2)","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1317,1318]},"content":"是局部有序的,即部分顺序、部分逆序,此时的时间复杂度介于两者之间,O(n)~O(n^2)","children":[]}]},{"type":"list_item","depth":6,"payload":{"lines":[1319,1320]},"content":"取决于增量序列函数","children":[{"type":"list_item","depth":7,"payload":{"lines":[1321,1322]},"content":"优于折半插入排序","children":[]},{"type":"list_item","depth":7,"payload":{"lines":[1322,1323]},"content":"最坏情况为O(n^2)","children":[]}]}]},{"type":"list_item","depth":5,"payload":{"lines":[1324,1325]},"content":"稳定性:【不稳定】,存在相同值元素分在不同的组进行直接插入排序","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1325,1326]},"content":"适用性:仅仅适用于顺序存储的线性表,虽然采用过程中有采用直接插入排序,但增量序列不为1的时候,需要随机存取,链式存储的时候无法满足","children":[]}]}]}]},{"type":"heading","depth":2,"payload":{"lines":[1327,1328]},"content":"交换排序","children":[{"type":"list_item","depth":3,"payload":{"lines":[1329,1330]},"content":"冒泡排序","children":[{"type":"list_item","depth":4,"payload":{"lines":[1331,1332]},"content":"算法简单、思路直接、十分常用但考查少","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1332,1333]},"content":"两元素交换方案","children":[{"type":"list_item","depth":5,"payload":{"lines":[1334,1335]},"content":"临时变量法","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1335,1336]},"content":"加减法","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1337,1338]},"content":"空间效率","children":[{"type":"list_item","depth":5,"payload":{"lines":[1339,1340]},"content":"仅使用了常数个辅助单元","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1340,1341]},"content":"空间复杂度为O(1)","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1342,1343]},"content":"时间效率","children":[{"type":"list_item","depth":5,"payload":{"lines":[1344,1345]},"content":"最好情况(顺序)","children":[{"type":"list_item","depth":6,"payload":{"lines":[1346,1347]},"content":"比较次数:n-1","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1347,1348]},"content":"移动次数:0","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1348,1349]},"content":"时间复杂度为:O(n)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1350,1351]},"content":"最坏情况(逆序)","children":[{"type":"list_item","depth":6,"payload":{"lines":[1352,1353]},"content":"比较次数:每趟比较(n-i)次","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1353,1354]},"content":"移动次数:每趟移动3次","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1354,1355]},"content":"时间复杂度为:O(n^2)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1356,1357]},"content":"时间复杂度为:O(n^2)","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1358,1359]},"content":"稳定性:【稳定】","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1360,1361]},"content":"快速排序","children":[{"type":"list_item","depth":4,"payload":{"lines":[1362,1363]},"content":"基于递归、理解困难、分而治之、关键基准pivot划分","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1363,1364]},"content":"空间效率","children":[{"type":"list_item","depth":5,"payload":{"lines":[1365,1366]},"content":"基于递归实现,需要借助递归工作栈来保存每一次递归调用的必要信息","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1366,1367]},"content":"最坏情况:进行n-1次递归,O(n)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1367,1368]},"content":"最好情况: log2(n+1) 向上取整","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1368,1369]},"content":"平均情况: O((n+1)以2为底的对数)","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1370,1371]},"content":"时间效率","children":[{"type":"list_item","depth":5,"payload":{"lines":[1372,1373]},"content":"运行时间与划分操作Partition()函数【不对称相关】","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1373,1374]},"content":"最坏情况","children":[{"type":"list_item","depth":6,"payload":{"lines":[1375,1376]},"content":"数组长度为n","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1376,1377]},"content":"左侧快排的数组长度为n-1,有n-1个元素【初始排序表基本有序】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1377,1378]},"content":"右侧快排的数组长度为0,有0个元素【初始排序表基本逆序】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1378,1379]},"content":"时间复杂度为:O(n^2)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1380,1381]},"content":"效率优化","children":[{"type":"list_item","depth":6,"payload":{"lines":[1382,1383]},"content":"递归过程中划分得到的子序列规模较小时候,不再递归调用快速排序 ----->改用直接插入排序【时间复杂度最好O(n),性能好】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1383,1384]},"content":"尽量选择能将数据中分的基准值元素","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1384,1385]},"content":"随机从当前表中选取基准值元素,几乎避免最坏情况的发生","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[1386,1387]},"content":"稳定性:【不稳定】,存在值相同的元素,位置与最终位置不一致情况","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1387,1388]},"content":"重要:【是所有内部算法中平均新能最优的排序算法】","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[1389,1390]},"content":"选择排序(TBD)","children":[{"type":"list_item","depth":3,"payload":{"lines":[1391,1392]},"content":"简单选择排序","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1392,1393]},"content":"堆排序","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[1394,1395]},"content":"归并排序(TBD)","children":[]},{"type":"heading","depth":2,"payload":{"lines":[1396,1397]},"content":"基数排序","children":[{"type":"list_item","depth":3,"payload":{"lines":[1398,1399]},"content":"很特别的排序算法,【不是基于比较进行排序的】","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1399,1400]},"content":"基本步骤【趟数取决于元素的最大位数】","children":[{"type":"list_item","depth":4,"payload":{"lines":[1401,1402]},"content":"分配:依次考察线性表元素,放入队列中","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1402,1403]},"content":"收集:各队列中结点一次首尾相接,组成新的线性表","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1404,1405]},"content":"分类","children":[{"type":"list_item","depth":4,"payload":{"lines":[1406,1407]},"content":"最高位优先排序【MSD】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1407,1408]},"content":"最低位优先排序【LSD】","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1409,1410]},"content":"性能分析","children":[{"type":"list_item","depth":4,"payload":{"lines":[1411,1412]},"content":"空间效率:","children":[{"type":"list_item","depth":5,"payload":{"lines":[1413,1414]},"content":"一趟排序需要r个队列的辅助存储空间,后续排序这些队列将会复用","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1414,1415]},"content":"空间复杂度为:O(n)","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1416,1417]},"content":"时间效率","children":[{"type":"list_item","depth":5,"payload":{"lines":[1418,1419]},"content":"进行d趟分配和收集操作","children":[{"type":"list_item","depth":6,"payload":{"lines":[1420,1421]},"content":"一趟分配需要O(n)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1421,1422]},"content":"一趟收集需要O(r)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1423,1424]},"content":"平均情况:时间复杂度为O(d*(n+r))","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1424,1425]},"content":"【重要】算法的时间效率与初始排序表状态无关,依赖于分配和收集操作","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1426,1427]},"content":"稳定性:【稳定】<----- 按位排序必须稳定","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[1428,1429]},"content":"内部排序","children":[{"type":"list_item","depth":3,"payload":{"lines":[1430,1431]},"content":"各算法性能比较","children":[{"type":"list_item","depth":4,"payload":{"lines":[1432,1433]},"content":"从时间复杂度来看","children":[{"type":"list_item","depth":5,"payload":{"lines":[1434,1435]},"content":"平均情况O(n^2)","children":[{"type":"list_item","depth":6,"payload":{"lines":[1436,1437]},"content":"直接插入排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1437,1438]},"content":"简单选择排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1438,1439]},"content":"冒泡排序","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1440,1441]},"content":"最好情况O(n)【顺序情况】","children":[{"type":"list_item","depth":6,"payload":{"lines":[1442,1443]},"content":"直接插入排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1443,1444]},"content":"冒泡排序","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1445,1446]},"content":"O(nlog2n)","children":[{"type":"list_item","depth":6,"payload":{"lines":[1447,1448]},"content":"归并排序与初始序列的排序列无关,所有情况下时间复杂度都是O(nlog2n)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1448,1449]},"content":"堆排序利用数据结构堆,线性时间完成建堆,在O(nlog2n)内完成排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1449,1450]},"content":"快排平均性能可以达到O(nlog2n)【性能常常优于其他排序算法】","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1451,1452]},"content":"基于分治法的思想","children":[{"type":"list_item","depth":6,"payload":{"lines":[1453,1454]},"content":"快速排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1454,1455]},"content":"归并排序","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1456,1457]},"content":"简单选择排序与序列的初始值状态无关","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1457,1458]},"content":"希尔排序是插入排序的拓展,在大规模排序中可以达到很高的效率n^1.3~2","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1459,1460]},"content":"从空间复杂度来看","children":[{"type":"list_item","depth":5,"payload":{"lines":[1461,1462]},"content":"借助常数个辅助空间","children":[{"type":"list_item","depth":6,"payload":{"lines":[1463,1464]},"content":"简单选择排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1464,1465]},"content":"插入排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1465,1466]},"content":"冒泡排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1466,1467]},"content":"希尔排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1467,1468]},"content":"堆排序","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1469,1470]},"content":"快速排序在空间上只适用一个小的辅助栈,实现【递归】","children":[{"type":"list_item","depth":6,"payload":{"lines":[1471,1472]},"content":"平均情况:O(log2n)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1472,1473]},"content":"最坏情况:O(n)","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1474,1475]},"content":"二路归并排序需要较多的辅助空间,为O(n),可以采取时间换空间的思路来减少辅助空间【不建议,导致算法复杂】","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1476,1477]},"content":"从稳定性来看","children":[{"type":"list_item","depth":5,"payload":{"lines":[1478,1479]},"content":"稳定的","children":[{"type":"list_item","depth":6,"payload":{"lines":[1480,1481]},"content":"插入排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1481,1482]},"content":"冒泡排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1482,1483]},"content":"归并排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1483,1484]},"content":"基数排序","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1485,1486]},"content":"不稳定","children":[{"type":"list_item","depth":6,"payload":{"lines":[1487,1488]},"content":"简单选择排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1488,1489]},"content":"快速排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1489,1490]},"content":"希尔排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1490,1491]},"content":"堆排序","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[1492,1493]},"content":"从过程特征来看","children":[{"type":"list_item","depth":5,"payload":{"lines":[1494,1495]},"content":"冒泡排序和堆排序每次循环都能拿到当前的最大值或最小值","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1495,1496]},"content":"快速排序每次循环都能确定一个元素到最终位置上","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1496,1497]},"content":"冒泡排序每一趟冒泡也能确定一个元素到最终位置上","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[1498,1499]},"content":"算法运用","children":[{"type":"list_item","depth":4,"payload":{"lines":[1500,1501]},"content":"排序方法选取需要考虑的因素","children":[{"type":"list_item","depth":5,"payload":{"lines":[1502,1503]},"content":"待排序的元素数目n","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1503,1504]},"content":"元素本身信息量大小","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1504,1505]},"content":"关键字的结构和分布情况","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1505,1506]},"content":"稳定性的要求","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1506,1507]},"content":"语言工具、存储结构、辅助空间大小","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1508,1509]},"content":"排序算法小结","children":[{"type":"list_item","depth":5,"payload":{"lines":[1510,1511]},"content":"n很小时选择","children":[{"type":"list_item","depth":6,"payload":{"lines":[1512,1513]},"content":"直接插入排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1513,1514]},"content":"简单插入排序","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1515,1516]},"content":"关键字基本【有序】时选择","children":[{"type":"list_item","depth":6,"payload":{"lines":[1517,1518]},"content":"直接插入排序","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1518,1519]},"content":"冒泡排序","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1520,1521]},"content":"n较大时选择O(nlog2n)的排序","children":[{"type":"list_item","depth":6,"payload":{"lines":[1522,1523]},"content":"快速排序【不稳定】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1523,1524]},"content":"堆排序【不稳定】","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1524,1525]},"content":"归并排序【稳定】","children":[]}]},{"type":"list_item","depth":5,"payload":{"lines":[1526,1527]},"content":"n很大且关键字位较少、可分解,建议选择【基数排序】","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1527,1528]},"content":"信息量较大、元素较多,存储结构可以采用【链表】,减少不必要的时间去元素移动","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1529,1530]},"content":"快速排序被认为是基于比较的内部排序中最好的排序方法","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1530,1531]},"content":"基于比较的排序算法中,每次比较两个关键字之后,只有两种情况(大于|小于)----> 二叉树, 时间复杂度至少为O(nlog2n)","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[1532,1533]},"content":"外部排序","children":[{"type":"list_item","depth":3,"payload":{"lines":[1534,1535]},"content":"基本概念","children":[{"type":"list_item","depth":4,"payload":{"lines":[1536,1537]},"content":"内部排序:排序方法在内存中进行的排序","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1537,1538]},"content":"外部排序:排序过程中需要多次进行内存、外存交换,对外存文件中的记录进行排序后【仍然存放在外存原有文件中】的排序","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1538,1539]},"content":"外部排序原因:对大文件进行排序,内存控件有限,文件中信息量庞大,无法将整个文件拷贝进内存中进行排序,需要多次调入内存进行排序","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1540,1541]},"content":"外部排序方法","children":[{"type":"list_item","depth":4,"payload":{"lines":[1542,1543]},"content":"分类【依据外存设备的不同】","children":[{"type":"list_item","depth":5,"payload":{"lines":[1544,1545]},"content":"磁盘文件排序","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1545,1546]},"content":"磁带文件排序","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1547,1548]},"content":"分布方式","children":[{"type":"list_item","depth":5,"payload":{"lines":[1549,1550]},"content":"磁盘是直接存取设备","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1550,1551]},"content":"磁带是顺序存取设备","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1552,1553]},"content":"文件通常是【按块存储】在磁盘上,操作系统也是【按块读取】磁盘上的信息","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1553,1554]},"content":"外部排序中时间代价主要考虑【访问磁盘的次数】,即I/O次数","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1554,1555]},"content":"【通常采用归并排序方法】","children":[]}]}]},{"type":"heading","depth":2,"payload":{"lines":[1556,1557]},"content":"补充总结和复习","children":[{"type":"list_item","depth":3,"payload":{"lines":[1558,1559]},"content":"元素个数不是很大(n<1000)","children":[{"type":"list_item","depth":4,"payload":{"lines":[1560,1561]},"content":"直接插入排序【稳定】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1561,1562]},"content":"冒泡排序【稳定】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1562,1563]},"content":"简单选择排序【不稳定】","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1563,1564]},"content":"空间复杂度都为O(1),只需要一个辅助元素","children":[]},{"type":"list_item","depth":4,"payload":{"lines":[1564,1565]},"content":"平均时间复杂度都为O(n^2)","children":[]}]},{"type":"list_item","depth":3,"payload":{"lines":[1566,1567]},"content":"中等规模的元素,希尔排序【不稳定】是非常好的选择,比直接插入排序要好(n越大越明显),不占用额外内存空间,减少直接排序次数","children":[]},{"type":"list_item","depth":3,"payload":{"lines":[1567,1568]},"content":"元素个数很多(n很大)","children":[{"type":"list_item","depth":4,"payload":{"lines":[1569,1570]},"content":"快速排序【不稳定】","children":[{"type":"list_item","depth":5,"payload":{"lines":[1571,1572]},"content":"最通用、高效的内部排序算法","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1572,1573]},"content":"平均时间复杂度为O(nlog2n)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1573,1574]},"content":"一般空间复杂度为O(log2n)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1574,1575]},"content":"最快情况,性能退化【元素基本有序时】","children":[{"type":"list_item","depth":6,"payload":{"lines":[1576,1577]},"content":"时间复杂度提高到O(n^2)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1577,1578]},"content":"空间复杂度提高到O(n)","children":[]},{"type":"list_item","depth":6,"payload":{"lines":[1578,1579]},"content":"解决方案: 三者(low,mid,high)取中,获取枢纽值【注意严版采用的是low,high】","children":[]}]}]},{"type":"list_item","depth":4,"payload":{"lines":[1580,1581]},"content":"堆排序【不稳定】","children":[{"type":"list_item","depth":5,"payload":{"lines":[1582,1583]},"content":"高效的内部排序算法","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1583,1584]},"content":"时间复杂度为O(nlog2n)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1584,1585]},"content":"没啥最坏情况,基本不需要额外的存储空间","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1586,1587]},"content":"归并排序【稳定】","children":[{"type":"list_item","depth":5,"payload":{"lines":[1588,1589]},"content":"性能与初始化元素序列无关","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1589,1590]},"content":"时间复杂度总为O(nlog2n)","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1590,1591]},"content":"【明显缺点】:需要O(n)的额外存储空间","children":[]}]},{"type":"list_item","depth":4,"payload":{"lines":[1592,1593]},"content":"基数排序【稳定】","children":[{"type":"list_item","depth":5,"payload":{"lines":[1594,1595]},"content":"特殊的排序算法","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1595,1596]},"content":"除了对元素序列的关键字比较,更对关键字的不同位也进行处理和比较","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1596,1597]},"content":"具有线性增长的时间复杂度O(d*(n+r)),适用性比较低、应用场景相对少","children":[]},{"type":"list_item","depth":5,"payload":{"lines":[1597,1598]},"content":"需要额外的存储空间,一般用队列来实现桶","children":[]}]}]},{"type":"list_item","depth":3,"payload":{"lines":[1599,1600]},"content":"【重要】不同的排序算法缓和使用,往往能够对算法进行不错的改进,获得更好的性能","children":[]}]}]}]},null) diff --git a/docs/.vuepress/public/mark-map/os-map.html b/docs/.vuepress/public/mark-map/os-map.html index 5a772df..1e4e743 100644 --- a/docs/.vuepress/public/mark-map/os-map.html +++ b/docs/.vuepress/public/mark-map/os-map.html @@ -35,6 +35,6 @@ }) + })(() => window.markmap,null,{"type":"heading","depth":0,"payload":{"lines":[1,2]},"content":"操作系统","children":[{"type":"heading","depth":1,"payload":{"lines":[5,6]},"content":"引论","children":[]},{"type":"heading","depth":1,"payload":{"lines":[7,8]},"content":"进程管理","children":[]},{"type":"heading","depth":1,"payload":{"lines":[9,10]},"content":"内存管理","children":[]},{"type":"heading","depth":1,"payload":{"lines":[11,12]},"content":"一些总结","children":[]},{"type":"heading","depth":1,"payload":{"lines":[13,14]},"content":"I/O管理","children":[]},{"type":"heading","depth":1,"payload":{"lines":[15,16]},"content":"文件管理","children":[]}]},null) diff --git a/docs/.vuepress/styles/config.scss b/docs/.vuepress/styles/config.scss index 9efae0e..65325a0 100644 --- a/docs/.vuepress/styles/config.scss +++ b/docs/.vuepress/styles/config.scss @@ -7,4 +7,4 @@ $code-light-them: "coldark-cold"; $code-dark-theme: "atom-dark"; // 主题色 -$theme-colors: #2196f3, #f26d6d, #3eaf7c, #fb9b5f; \ No newline at end of file +//$theme-colors: #2196f3, #f26d6d, #3eaf7c, #fb9b5f; \ No newline at end of file diff --git a/docs/.vuepress/styles/index.scss b/docs/.vuepress/styles/index.scss index b4b1536..89f490f 100644 --- a/docs/.vuepress/styles/index.scss +++ b/docs/.vuepress/styles/index.scss @@ -1,18 +1,5 @@ /* 此处自定义样式,对主题进行覆盖 */ -//首页导航按钮 -.actions > a { - margin-left: 5px; - margin-right: 5px; -} - -// 隐藏 全文搜索 -.DocSearch-Logo { - // display:none;不占位隐藏 - visibility: hidden; // 占位隐藏 -} - - // 全站主题色 :root { // brand colors @@ -90,11 +77,6 @@ --homepage-width: 960px; } -// plugin-back-to-top -.back-to-top { - --back-to-top-color: var(--c-brand); - --back-to-top-color-hover: var(--c-brand-light); -} // plugin-docsearch .DocSearch { @@ -124,10 +106,6 @@ --medium-zoom-bg-color: var(--c-bg); } -// plugin-nprogress -#nprogress { - --nprogress-color: var(--c-brand); -} // plugin-pwa-popup .pwa-popup { @@ -150,4 +128,3 @@ --search-item-text-color: var(--c-text-lighter); --search-item-focus-bg-color: var(--c-bg-light); } - diff --git a/docs/.vuepress/styles/palette.scss b/docs/.vuepress/styles/palette.scss index 4a9242b..ed95922 100644 --- a/docs/.vuepress/styles/palette.scss +++ b/docs/.vuepress/styles/palette.scss @@ -1,6 +1,7 @@ // 主题色 -$theme-color: #2980B9; -$sidebar-width: 20rem; -$sidebar-mobile-width: 16rem; -$content-width: 75rem; -$home-page-width:80rem; \ No newline at end of file +//$theme-color: #2980B9; +$theme-color: #4979ff; +//$sidebar-width: 20rem; +//$sidebar-mobile-width: 16rem; +//$content-width: 75rem; +$home-page-width: 80rem; \ No newline at end of file diff --git a/docs/big-event-history.md b/docs/manuscripts/big-event-history.md similarity index 63% rename from docs/big-event-history.md rename to docs/manuscripts/big-event-history.md index 0d4b2f9..7fdac76 100644 --- a/docs/big-event-history.md +++ b/docs/manuscripts/big-event-history.md @@ -1,4 +1,9 @@ -# 大事记 +--- +title: 网站动态 +permalink: /manuscripts/big-event-history.html +--- + +# 网站动态 > 有时间再梳理梳理吧.... diff --git a/docs/changelog.md b/docs/manuscripts/changelog.md similarity index 68% rename from docs/changelog.md rename to docs/manuscripts/changelog.md index df4052d..4b0c185 100644 --- a/docs/changelog.md +++ b/docs/manuscripts/changelog.md @@ -1,8 +1,12 @@ +--- +title: 变更记录 +permalink: /manuscripts/changelog.html +--- # 变更记录 该文件包含 `408CSFamily` 仓库和网站所有显着更改。 - + ## 更多 diff --git a/docs/manuscripts/cn/传输层/1.提供的服务.md b/docs/manuscripts/cn/传输层/1.提供的服务.md index 2cb7371..4babb82 100644 --- a/docs/manuscripts/cn/传输层/1.提供的服务.md +++ b/docs/manuscripts/cn/传输层/1.提供的服务.md @@ -1,3 +1,8 @@ +--- +title: 提供的服务 +permalink: /manuscripts/cn/trans-port-layer/provider-service.html +--- + # 提供的服务 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/传输层/2.UDP协议.md b/docs/manuscripts/cn/传输层/2.UDP协议.md index cafc173..aa7c6b4 100644 --- a/docs/manuscripts/cn/传输层/2.UDP协议.md +++ b/docs/manuscripts/cn/传输层/2.UDP协议.md @@ -1,3 +1,7 @@ +--- +title: UDP协议 +permalink: /manuscripts/cn/trans-port-layer/udp.html +--- # UDP协议 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/传输层/3.TCP协议.md b/docs/manuscripts/cn/传输层/3.TCP协议.md index c570037..03e687a 100644 --- a/docs/manuscripts/cn/传输层/3.TCP协议.md +++ b/docs/manuscripts/cn/传输层/3.TCP协议.md @@ -1,3 +1,7 @@ +--- +title: TCP协议 +permalink: /manuscripts/cn/trans-port-layer/tcp.html +--- # TCP协议 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/传输层/4.总结.md b/docs/manuscripts/cn/传输层/4.总结.md index 43c0132..4609f00 100644 --- a/docs/manuscripts/cn/传输层/4.总结.md +++ b/docs/manuscripts/cn/传输层/4.总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/cn/trans-port-layer/summary.html +--- + # 总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/体系结构/1.引论.md b/docs/manuscripts/cn/体系结构/1.引论.md index 64a48ab..5229bbb 100644 --- a/docs/manuscripts/cn/体系结构/1.引论.md +++ b/docs/manuscripts/cn/体系结构/1.引论.md @@ -1,3 +1,8 @@ +--- +title: 基本介绍 +permalink: /manuscripts/cn/architecture/introduce.html +--- + # 基本介绍 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/体系结构/2.体系结构与参考模型.md b/docs/manuscripts/cn/体系结构/2.体系结构与参考模型.md index 99c54fd..1d45eeb 100644 --- a/docs/manuscripts/cn/体系结构/2.体系结构与参考模型.md +++ b/docs/manuscripts/cn/体系结构/2.体系结构与参考模型.md @@ -1,3 +1,8 @@ +--- +title: 体系结构与参考模型 +permalink: /manuscripts/cn/architecture/reference-model.html +--- + # 体系结构与参考模型 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/应用层/1.应用模型.md b/docs/manuscripts/cn/应用层/1.应用模型.md index 0ca1354..9325835 100644 --- a/docs/manuscripts/cn/应用层/1.应用模型.md +++ b/docs/manuscripts/cn/应用层/1.应用模型.md @@ -1,3 +1,8 @@ +--- +title: 应用模型 +permalink: /manuscripts/cn/application-layer/application-model.html +--- + # 应用模型 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/应用层/2.DNS.md b/docs/manuscripts/cn/应用层/2.DNS.md index a74ef11..19df768 100644 --- a/docs/manuscripts/cn/应用层/2.DNS.md +++ b/docs/manuscripts/cn/应用层/2.DNS.md @@ -1,3 +1,7 @@ +--- +title: DNS +permalink: /manuscripts/cn/application-layer/dns.html +--- # DNS 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/应用层/3.FTP.md b/docs/manuscripts/cn/应用层/3.FTP.md index 3cfe01a..4652125 100644 --- a/docs/manuscripts/cn/应用层/3.FTP.md +++ b/docs/manuscripts/cn/应用层/3.FTP.md @@ -1,3 +1,7 @@ +--- +title: FTP +permalink: /manuscripts/cn/application-layer/ftp.html +--- # FTP 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/应用层/4.HTTP.md b/docs/manuscripts/cn/应用层/4.HTTP.md index bc10bce..875370c 100644 --- a/docs/manuscripts/cn/应用层/4.HTTP.md +++ b/docs/manuscripts/cn/应用层/4.HTTP.md @@ -1,3 +1,7 @@ +--- +title: HTTP +permalink: /manuscripts/cn/application-layer/http.html +--- # HTTP 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/应用层/4.电子邮件.md b/docs/manuscripts/cn/应用层/4.电子邮件.md index bd8fd38..b47f348 100644 --- a/docs/manuscripts/cn/应用层/4.电子邮件.md +++ b/docs/manuscripts/cn/应用层/4.电子邮件.md @@ -1,3 +1,7 @@ +--- +title: 电子邮件 +permalink: /manuscripts/cn/application-layer/email.html +--- # 电子邮件 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/应用层/5.总结.md b/docs/manuscripts/cn/应用层/5.总结.md index 43c0132..342d5d5 100644 --- a/docs/manuscripts/cn/应用层/5.总结.md +++ b/docs/manuscripts/cn/应用层/5.总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/cn/application-layer/summary.html +--- + # 总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/数据链路层/1.通信基础.md b/docs/manuscripts/cn/数据链路层/1.通信基础.md index 98c0d03..1cdf681 100644 --- a/docs/manuscripts/cn/数据链路层/1.通信基础.md +++ b/docs/manuscripts/cn/数据链路层/1.通信基础.md @@ -1,3 +1,8 @@ +--- +title: 通信基础 +permalink: /manuscripts/cn/data-link-layer/connect-base.html +--- + # 基本功能 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/数据链路层/2.组帧.md b/docs/manuscripts/cn/数据链路层/2.组帧.md index 38f85fb..f445c11 100644 --- a/docs/manuscripts/cn/数据链路层/2.组帧.md +++ b/docs/manuscripts/cn/数据链路层/2.组帧.md @@ -1,3 +1,7 @@ +--- +title: 组帧 +permalink: /manuscripts/cn/data-link-layer/framing.html +--- # 组帧 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/数据链路层/3.差错控制.md b/docs/manuscripts/cn/数据链路层/3.差错控制.md index a1c4a45..95d4655 100644 --- a/docs/manuscripts/cn/数据链路层/3.差错控制.md +++ b/docs/manuscripts/cn/数据链路层/3.差错控制.md @@ -1,3 +1,7 @@ +--- +title: 差错控制 +permalink: /manuscripts/cn/data-link-layer/error-control.html +--- # 差错控制 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/数据链路层/4.流量控制&可靠传输.md b/docs/manuscripts/cn/数据链路层/4.流量控制&可靠传输.md index 5dfd8af..1c252b6 100644 --- a/docs/manuscripts/cn/数据链路层/4.流量控制&可靠传输.md +++ b/docs/manuscripts/cn/数据链路层/4.流量控制&可靠传输.md @@ -1,3 +1,8 @@ +--- +title: 流量控制&可靠传输 +permalink: /manuscripts/cn/data-link-layer/flow-control.html +--- + # 流量控制&可靠传输 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/数据链路层/5.介质访问控制.md b/docs/manuscripts/cn/数据链路层/5.介质访问控制.md index d560f49..c521cbf 100644 --- a/docs/manuscripts/cn/数据链路层/5.介质访问控制.md +++ b/docs/manuscripts/cn/数据链路层/5.介质访问控制.md @@ -1,3 +1,8 @@ +--- +title: 介质访问控制 +permalink: /manuscripts/cn/data-link-layer/media-access-control.html +--- + # 介质访问控制 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/数据链路层/6.局域网.md b/docs/manuscripts/cn/数据链路层/6.局域网.md index 887d545..08c515e 100644 --- a/docs/manuscripts/cn/数据链路层/6.局域网.md +++ b/docs/manuscripts/cn/数据链路层/6.局域网.md @@ -1,3 +1,8 @@ +--- +title: 局域网 +permalink: /manuscripts/cn/data-link-layer/local-area-network.html +--- + # 局域网 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/数据链路层/7.广域网.md b/docs/manuscripts/cn/数据链路层/7.广域网.md index 1ccd046..a0332b4 100644 --- a/docs/manuscripts/cn/数据链路层/7.广域网.md +++ b/docs/manuscripts/cn/数据链路层/7.广域网.md @@ -1,3 +1,8 @@ +--- +title: 广域网 +permalink: /manuscripts/cn/data-link-layer/wan-network.html +--- + # 广域网 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/数据链路层/7.通信设备.md b/docs/manuscripts/cn/数据链路层/7.通信设备.md index 60233fe..2daca01 100644 --- a/docs/manuscripts/cn/数据链路层/7.通信设备.md +++ b/docs/manuscripts/cn/数据链路层/7.通信设备.md @@ -1,3 +1,7 @@ +--- +title: 通信设备 +permalink: /manuscripts/cn/data-link-layer/equipment.html +--- # 通信设备 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/数据链路层/8.总结.md b/docs/manuscripts/cn/数据链路层/8.总结.md index 43c0132..7b2b0a3 100644 --- a/docs/manuscripts/cn/数据链路层/8.总结.md +++ b/docs/manuscripts/cn/数据链路层/8.总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/cn/data-link-layer/summary.html +--- + # 总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/物理层/1.通信基础.md b/docs/manuscripts/cn/物理层/1.通信基础.md index d141055..19fed9f 100644 --- a/docs/manuscripts/cn/物理层/1.通信基础.md +++ b/docs/manuscripts/cn/物理层/1.通信基础.md @@ -1,3 +1,8 @@ +--- +title: 通信基础 +permalink: /manuscripts/cn/physical-layer/correspondence-base.html +--- + # 通信基础 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/物理层/2.传输介质.md b/docs/manuscripts/cn/物理层/2.传输介质.md index 7c96127..a8211ea 100644 --- a/docs/manuscripts/cn/物理层/2.传输介质.md +++ b/docs/manuscripts/cn/物理层/2.传输介质.md @@ -1,3 +1,7 @@ +--- +title: 传输介质 +permalink: /manuscripts/cn/physical-layer/transmission-medium.html +--- # 传输介质 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/物理层/3.物理层设备.md b/docs/manuscripts/cn/物理层/3.物理层设备.md index 29c634c..aef5d69 100644 --- a/docs/manuscripts/cn/物理层/3.物理层设备.md +++ b/docs/manuscripts/cn/物理层/3.物理层设备.md @@ -1,3 +1,8 @@ +--- +title: 物理层设备 +permalink: /manuscripts/cn/physical-layer/devices.html +--- + # 物理层设备 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/物理层/4.总结.md b/docs/manuscripts/cn/物理层/4.总结.md index 43c0132..88d198d 100644 --- a/docs/manuscripts/cn/物理层/4.总结.md +++ b/docs/manuscripts/cn/物理层/4.总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/cn/physical-layer/summary.html +--- + # 总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/网络层/1.基本功能.md b/docs/manuscripts/cn/网络层/1.基本功能.md index 98c0d03..f1ded10 100644 --- a/docs/manuscripts/cn/网络层/1.基本功能.md +++ b/docs/manuscripts/cn/网络层/1.基本功能.md @@ -1,3 +1,8 @@ +--- +title: 基本功能 +permalink: /manuscripts/cn/network-layer/base.html +--- + # 基本功能 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/网络层/2.路由算法.md b/docs/manuscripts/cn/网络层/2.路由算法.md index 778ee60..e3dfe7b 100644 --- a/docs/manuscripts/cn/网络层/2.路由算法.md +++ b/docs/manuscripts/cn/网络层/2.路由算法.md @@ -1,3 +1,8 @@ +--- +title: 路由算法 +permalink: /manuscripts/cn/network-layer/route-algorithm.html +--- + # 路由算法 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/网络层/3.路由协议.md b/docs/manuscripts/cn/网络层/3.路由协议.md index bbeca55..bc756e6 100644 --- a/docs/manuscripts/cn/网络层/3.路由协议.md +++ b/docs/manuscripts/cn/网络层/3.路由协议.md @@ -1,3 +1,8 @@ +--- +title: 路由协议 +permalink: /manuscripts/cn/network-layer/route-protocol.html +--- + # 路由协议 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/网络层/4.IPV4.md b/docs/manuscripts/cn/网络层/4.IPV4.md index 6900594..6abaa34 100644 --- a/docs/manuscripts/cn/网络层/4.IPV4.md +++ b/docs/manuscripts/cn/网络层/4.IPV4.md @@ -1,3 +1,8 @@ +--- +title: IPV4 +permalink: /manuscripts/cn/network-layer/ipv4.html +--- + # IPV4 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/网络层/5.IPV6.md b/docs/manuscripts/cn/网络层/5.IPV6.md index 2546ea8..23f8217 100644 --- a/docs/manuscripts/cn/网络层/5.IPV6.md +++ b/docs/manuscripts/cn/网络层/5.IPV6.md @@ -1,3 +1,8 @@ +--- +title: IPV6 +permalink: /manuscripts/cn/network-layer/ipv6.html +--- + # IPV6 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/网络层/6.IP组播&移动IP.md b/docs/manuscripts/cn/网络层/6.IP组播&移动IP.md index 39da3df..a7345b3 100644 --- a/docs/manuscripts/cn/网络层/6.IP组播&移动IP.md +++ b/docs/manuscripts/cn/网络层/6.IP组播&移动IP.md @@ -1,3 +1,8 @@ +--- +title: IP组播&移动IP +permalink: /manuscripts/cn/network-layer/mobile-ip.html +--- + # IP组播&移动IP 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/网络层/7.网络层设备.md b/docs/manuscripts/cn/网络层/7.网络层设备.md index 8a5a7c9..7bb9ce1 100644 --- a/docs/manuscripts/cn/网络层/7.网络层设备.md +++ b/docs/manuscripts/cn/网络层/7.网络层设备.md @@ -1,3 +1,8 @@ +--- +title: 网络层设备 +permalink: /manuscripts/cn/network-layer/equipment.html +--- + # 网络层设备 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/cn/网络层/8.总结.md b/docs/manuscripts/cn/网络层/8.总结.md index b78efa4..72d60b5 100644 --- a/docs/manuscripts/cn/网络层/8.总结.md +++ b/docs/manuscripts/cn/网络层/8.总结.md @@ -1,3 +1,7 @@ +--- +title: 一些总结 +permalink: /manuscripts/cn/network-layer/summary.html +--- # 一些总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/串/1.基本概念.md b/docs/manuscripts/ds/串/1.基本概念.md index 8788987..30497a5 100644 --- a/docs/manuscripts/ds/串/1.基本概念.md +++ b/docs/manuscripts/ds/串/1.基本概念.md @@ -1,3 +1,8 @@ +--- +title: 基本概念 +permalink: /manuscripts/ds/string/base-concept.html +--- + # 基本概念 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/串/2.简单的模式匹配.md b/docs/manuscripts/ds/串/2.简单的模式匹配.md index 17bf785..9de019f 100644 --- a/docs/manuscripts/ds/串/2.简单的模式匹配.md +++ b/docs/manuscripts/ds/串/2.简单的模式匹配.md @@ -1,3 +1,8 @@ +--- +title: 简单的模式匹配 +permalink: /manuscripts/ds/string/simple-pattern-matching.html +--- + # 简单的模式匹配 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/串/3.KMP算法.md b/docs/manuscripts/ds/串/3.KMP算法.md index d251b43..d26fc68 100644 --- a/docs/manuscripts/ds/串/3.KMP算法.md +++ b/docs/manuscripts/ds/串/3.KMP算法.md @@ -1,3 +1,7 @@ +--- +title: KMP算法 +permalink: /manuscripts/ds/string/kmp.html +--- # KMP算法 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/串/4.总结.md b/docs/manuscripts/ds/串/4.总结.md index 43c0132..7564142 100644 --- a/docs/manuscripts/ds/串/4.总结.md +++ b/docs/manuscripts/ds/串/4.总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/ds/string/summary.html +--- + # 总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/图论/1.基本概念.md b/docs/manuscripts/ds/图论/1.基本概念.md index 8788987..3713520 100644 --- a/docs/manuscripts/ds/图论/1.基本概念.md +++ b/docs/manuscripts/ds/图论/1.基本概念.md @@ -1,3 +1,8 @@ +--- +title: 基本概念 +permalink: /manuscripts/ds/graph/base-concept.html +--- + # 基本概念 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/图论/2.图的存储.md b/docs/manuscripts/ds/图论/2.图的存储.md index 2571a37..897a724 100644 --- a/docs/manuscripts/ds/图论/2.图的存储.md +++ b/docs/manuscripts/ds/图论/2.图的存储.md @@ -1,3 +1,7 @@ +--- +title: 图的存储 +permalink: /manuscripts/ds/graph/store.html +--- # 图的存储 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/图论/3.图的遍历.md b/docs/manuscripts/ds/图论/3.图的遍历.md index 6f12c2a..14b0cba 100644 --- a/docs/manuscripts/ds/图论/3.图的遍历.md +++ b/docs/manuscripts/ds/图论/3.图的遍历.md @@ -1,3 +1,7 @@ +--- +title: 图的遍历 +permalink: /manuscripts/ds/graph/traverse.html +--- # 图的遍历 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/图论/4.图的应用.md b/docs/manuscripts/ds/图论/4.图的应用.md index 6776c38..216144c 100644 --- a/docs/manuscripts/ds/图论/4.图的应用.md +++ b/docs/manuscripts/ds/图论/4.图的应用.md @@ -1,3 +1,7 @@ +--- +title: 图的应用 +permalink: /manuscripts/ds/graph/apply.html +--- # 图的应用 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/图论/5.总结.md b/docs/manuscripts/ds/图论/5.总结.md index 43c0132..0ee45da 100644 --- a/docs/manuscripts/ds/图论/5.总结.md +++ b/docs/manuscripts/ds/图论/5.总结.md @@ -1,3 +1,7 @@ +--- +title: 一些总结 +permalink: /manuscripts/ds/graph/summary.html +--- # 总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/排序/1.基本概念.md b/docs/manuscripts/ds/排序/1.基本概念.md index 8788987..eef2ab9 100644 --- a/docs/manuscripts/ds/排序/1.基本概念.md +++ b/docs/manuscripts/ds/排序/1.基本概念.md @@ -1,3 +1,8 @@ +--- +title: 基本概念 +permalink: /manuscripts/ds/sort-algorithm/base-concept.html +--- + # 基本概念 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/排序/2.插入排序.md b/docs/manuscripts/ds/排序/2.插入排序.md index cbb666a..f9307f7 100644 --- a/docs/manuscripts/ds/排序/2.插入排序.md +++ b/docs/manuscripts/ds/排序/2.插入排序.md @@ -1,3 +1,8 @@ +--- +title: 插入排序 +permalink: /manuscripts/ds/sort-algorithm/insert-sort.html +--- + # 插入排序 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/排序/3.交换排序.md b/docs/manuscripts/ds/排序/3.交换排序.md index 34395d2..538a4c1 100644 --- a/docs/manuscripts/ds/排序/3.交换排序.md +++ b/docs/manuscripts/ds/排序/3.交换排序.md @@ -1,3 +1,7 @@ +--- +title: 交换排序 +permalink: /manuscripts/ds/sort-algorithm/swap-sort.html +--- # 交换排序 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/排序/4.选择排序.md b/docs/manuscripts/ds/排序/4.选择排序.md index 558642f..80d2c3c 100644 --- a/docs/manuscripts/ds/排序/4.选择排序.md +++ b/docs/manuscripts/ds/排序/4.选择排序.md @@ -1,3 +1,7 @@ +--- +title: 选择排序 +permalink: /manuscripts/ds/sort-algorithm/select-sort.html +--- # 选择排序 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/排序/5.归并排序.md b/docs/manuscripts/ds/排序/5.归并排序.md index 10ee6b1..a55f26f 100644 --- a/docs/manuscripts/ds/排序/5.归并排序.md +++ b/docs/manuscripts/ds/排序/5.归并排序.md @@ -1,3 +1,7 @@ +--- +title: 归并排序 +permalink: /manuscripts/ds/sort-algorithm/merge-sort.html +--- # 归并排序 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/排序/6.基数排序.md b/docs/manuscripts/ds/排序/6.基数排序.md index 4c84b96..1765604 100644 --- a/docs/manuscripts/ds/排序/6.基数排序.md +++ b/docs/manuscripts/ds/排序/6.基数排序.md @@ -1,3 +1,8 @@ +--- +title: 基数排序 +permalink: /manuscripts/ds/sort-algorithm/radix-sort.html +--- + # 基数排序 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/排序/7.外部排序.md b/docs/manuscripts/ds/排序/7.外部排序.md index e151517..4a96ed2 100644 --- a/docs/manuscripts/ds/排序/7.外部排序.md +++ b/docs/manuscripts/ds/排序/7.外部排序.md @@ -1,3 +1,7 @@ +--- +title: 外部排序 +permalink: /manuscripts/ds/sort-algorithm/outer-sort.html +--- # 外部排序 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/排序/8.总结.md b/docs/manuscripts/ds/排序/8.总结.md index 43c0132..e0af8ff 100644 --- a/docs/manuscripts/ds/排序/8.总结.md +++ b/docs/manuscripts/ds/排序/8.总结.md @@ -1,3 +1,7 @@ +--- +title: 一些总结 +permalink: /manuscripts/ds/sort-algorithm/summary.html +--- # 总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/查找/1.基本概念.md b/docs/manuscripts/ds/查找/1.基本概念.md index 8788987..d96401e 100644 --- a/docs/manuscripts/ds/查找/1.基本概念.md +++ b/docs/manuscripts/ds/查找/1.基本概念.md @@ -1,3 +1,8 @@ +--- +title: 基本概念 +permalink: /manuscripts/ds/search-algorithm/base-concept.html +--- + # 基本概念 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/查找/2.顺序查找.md b/docs/manuscripts/ds/查找/2.顺序查找.md index aa1d667..5a0c2a0 100644 --- a/docs/manuscripts/ds/查找/2.顺序查找.md +++ b/docs/manuscripts/ds/查找/2.顺序查找.md @@ -1,3 +1,8 @@ +--- +title: 顺序查找 +permalink: /manuscripts/ds/search-algorithm/order-search.html +--- + # 顺序查找 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/查找/3.折半查找.md b/docs/manuscripts/ds/查找/3.折半查找.md index 962077d..2e22595 100644 --- a/docs/manuscripts/ds/查找/3.折半查找.md +++ b/docs/manuscripts/ds/查找/3.折半查找.md @@ -1,3 +1,7 @@ +--- +title: 折半查找 +permalink: /manuscripts/ds/search-algorithm/binary-search.html +--- # 折半查找 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/查找/4.B树和B+树.md b/docs/manuscripts/ds/查找/4.B树和B+树.md index ac499bf..ae9c9de 100644 --- a/docs/manuscripts/ds/查找/4.B树和B+树.md +++ b/docs/manuscripts/ds/查找/4.B树和B+树.md @@ -1,3 +1,7 @@ +--- +title: B树和B+树 +permalink: /manuscripts/ds/search-algorithm/balance-tree.html +--- # B树和B+树 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/查找/5.散列表.md b/docs/manuscripts/ds/查找/5.散列表.md index e1076bb..13198ac 100644 --- a/docs/manuscripts/ds/查找/5.散列表.md +++ b/docs/manuscripts/ds/查找/5.散列表.md @@ -1,3 +1,7 @@ +--- +title: 散列表 +permalink: /manuscripts/ds/search-algorithm/hash-table.html +--- # 散列表 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/查找/6.总结.md b/docs/manuscripts/ds/查找/6.总结.md index 43c0132..1d93f18 100644 --- a/docs/manuscripts/ds/查找/6.总结.md +++ b/docs/manuscripts/ds/查找/6.总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/ds/search-algorithm/summary.html +--- + # 总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/栈和队列/1.栈的基本概念和基本操作.md b/docs/manuscripts/ds/栈和队列/1.栈的基本概念和基本操作.md index 9fe8225..063fad9 100644 --- a/docs/manuscripts/ds/栈和队列/1.栈的基本概念和基本操作.md +++ b/docs/manuscripts/ds/栈和队列/1.栈的基本概念和基本操作.md @@ -1,7 +1,7 @@ --- title: 算法和算法评价 #description: -permalink: /manuscripts/ds/stack-basic-concepts.html +permalink: /manuscripts/ds/stack-queue/stack-basic-concepts.html head: - [meta, { name: 数据结构 , content: 栈的基本概念和基本操作 }] --- diff --git a/docs/manuscripts/ds/栈和队列/2.栈的顺序存储结构.md b/docs/manuscripts/ds/栈和队列/2.栈的顺序存储结构.md index c04857b..271d4de 100644 --- a/docs/manuscripts/ds/栈和队列/2.栈的顺序存储结构.md +++ b/docs/manuscripts/ds/栈和队列/2.栈的顺序存储结构.md @@ -1,7 +1,7 @@ --- title: 栈的顺序存储结构 #description: -permalink: /manuscripts/ds/stack-sequential-storage.html +permalink: /manuscripts/ds/stack-queue/stack-sequential-storage.html head: - [meta, { name: 数据结构 , content: 栈的顺序存储结构 }] --- diff --git a/docs/manuscripts/ds/栈和队列/3.栈的链式存储结构.md b/docs/manuscripts/ds/栈和队列/3.栈的链式存储结构.md index 6cef37d..3d644a3 100644 --- a/docs/manuscripts/ds/栈和队列/3.栈的链式存储结构.md +++ b/docs/manuscripts/ds/栈和队列/3.栈的链式存储结构.md @@ -1,7 +1,7 @@ --- title: 栈的链式存储结构 #description: -permalink: /manuscripts/ds/stack-chained-storage.html +permalink: /manuscripts/ds/stack-queue/stack-chained-storage.html head: - [meta, { name: 数据结构 , content: 栈的链式存储结构 }] --- diff --git a/docs/manuscripts/ds/栈和队列/4.队列的基本概念和操作.md b/docs/manuscripts/ds/栈和队列/4.队列的基本概念和操作.md index cc80b49..91b09d6 100644 --- a/docs/manuscripts/ds/栈和队列/4.队列的基本概念和操作.md +++ b/docs/manuscripts/ds/栈和队列/4.队列的基本概念和操作.md @@ -1,7 +1,7 @@ --- title: 队列的基本概念和操作 #description: -permalink: /manuscripts/ds/queue-basic-concepts.html +permalink: /manuscripts/ds/stack-queue/queue-basic-concepts.html head: - [meta, { name: 数据结构 , content: 队列的基本概念和操作 }] --- diff --git a/docs/manuscripts/ds/栈和队列/5.队列的顺序存储结构.md b/docs/manuscripts/ds/栈和队列/5.队列的顺序存储结构.md index ff2c1a2..cb37a6b 100644 --- a/docs/manuscripts/ds/栈和队列/5.队列的顺序存储结构.md +++ b/docs/manuscripts/ds/栈和队列/5.队列的顺序存储结构.md @@ -1,7 +1,7 @@ --- title: 队列的顺序存储结构 #description: -permalink: /manuscripts/ds/queue-sequential-storage.html +permalink: /manuscripts/ds/stack-queue/queue-sequential-storage.html head: - [meta, { name: 数据结构 , content: 队列的顺序存储结构 }] --- diff --git a/docs/manuscripts/ds/栈和队列/6.队列的链式存储结构.md b/docs/manuscripts/ds/栈和队列/6.队列的链式存储结构.md index c1caa3d..c46c99a 100644 --- a/docs/manuscripts/ds/栈和队列/6.队列的链式存储结构.md +++ b/docs/manuscripts/ds/栈和队列/6.队列的链式存储结构.md @@ -1,7 +1,7 @@ --- title: 队列的链式存储结构 #description: -permalink: /manuscripts/ds/queue-chained-storage.html +permalink: /manuscripts/ds/stack-queue/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 f6d37e5..57c98ab 100644 --- a/docs/manuscripts/ds/栈和队列/7.栈VS队列补充.md +++ b/docs/manuscripts/ds/栈和队列/7.栈VS队列补充.md @@ -1,7 +1,7 @@ --- title: 栈VS队列补充 #description: -permalink: /manuscripts/ds/stack-vs-queue.html +permalink: /manuscripts/ds/stack-queue/stack-vs-queue.html head: - [meta, { name: 数据结构 , content: 栈VS队列补充 }] --- diff --git a/docs/manuscripts/ds/树和二叉树/1.基本概念.md b/docs/manuscripts/ds/树和二叉树/1.基本概念.md index 8788987..6b59f4f 100644 --- a/docs/manuscripts/ds/树和二叉树/1.基本概念.md +++ b/docs/manuscripts/ds/树和二叉树/1.基本概念.md @@ -1,3 +1,8 @@ +--- +title: 基本概念 +permalink: /manuscripts/ds/tree/base-concept.html +--- + # 基本概念 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/树和二叉树/2.二叉树.md b/docs/manuscripts/ds/树和二叉树/2.二叉树.md index a7719e1..a9937fe 100644 --- a/docs/manuscripts/ds/树和二叉树/2.二叉树.md +++ b/docs/manuscripts/ds/树和二叉树/2.二叉树.md @@ -1,3 +1,8 @@ +--- +title: 二叉树 +permalink: /manuscripts/ds/tree/binary-tree.html +--- + # 二叉树 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/树和二叉树/3.二叉树的遍历.md b/docs/manuscripts/ds/树和二叉树/3.二叉树的遍历.md index e310e54..6ae5d78 100644 --- a/docs/manuscripts/ds/树和二叉树/3.二叉树的遍历.md +++ b/docs/manuscripts/ds/树和二叉树/3.二叉树的遍历.md @@ -1,3 +1,8 @@ +--- +title: 二叉树的遍历 +permalink: /manuscripts/ds/tree/binary-tree-traverse.html +--- + # 二叉树的遍历 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/树和二叉树/4.线索二叉树.md b/docs/manuscripts/ds/树和二叉树/4.线索二叉树.md index 6897ead..b2bbf3d 100644 --- a/docs/manuscripts/ds/树和二叉树/4.线索二叉树.md +++ b/docs/manuscripts/ds/树和二叉树/4.线索二叉树.md @@ -1,3 +1,7 @@ +--- +title: 线索二叉树 +permalink: /manuscripts/ds/tree/threaded-binary-tree.html +--- # 线索二叉树 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/树和二叉树/5.树和森林.md b/docs/manuscripts/ds/树和二叉树/5.树和森林.md index 41a9b1a..85a9507 100644 --- a/docs/manuscripts/ds/树和二叉树/5.树和森林.md +++ b/docs/manuscripts/ds/树和二叉树/5.树和森林.md @@ -1,3 +1,8 @@ +--- +title: 树和森林 +permalink: /manuscripts/ds/tree/tree-forest.html +--- + # 树和森林 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/树和二叉树/6.树的应用.md b/docs/manuscripts/ds/树和二叉树/6.树的应用.md index 12f5457..19596ac 100644 --- a/docs/manuscripts/ds/树和二叉树/6.树的应用.md +++ b/docs/manuscripts/ds/树和二叉树/6.树的应用.md @@ -1,3 +1,4 @@ + # 树的应用 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/树和二叉树/7.总结.md b/docs/manuscripts/ds/树和二叉树/7.总结.md index b78efa4..f6eda3f 100644 --- a/docs/manuscripts/ds/树和二叉树/7.总结.md +++ b/docs/manuscripts/ds/树和二叉树/7.总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/ds/tree/summary.html +--- + # 一些总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/ds/线性表/1.基础概念和操作.md b/docs/manuscripts/ds/线性表/1.基础概念和操作.md index b037cab..a506e68 100644 --- a/docs/manuscripts/ds/线性表/1.基础概念和操作.md +++ b/docs/manuscripts/ds/线性表/1.基础概念和操作.md @@ -1,7 +1,7 @@ --- title: 基础概念 #description: -permalink: /manuscripts/ds/linear-table-basic-concepts.html +permalink: /manuscripts/ds/linear-table/basic-concepts.html head: - [meta, { name: 数据结构 , content: 线性表的基础概念和操作 }] --- diff --git a/docs/manuscripts/ds/线性表/2.顺序表示.md b/docs/manuscripts/ds/线性表/2.顺序表示.md index e69de29..1ed2e8e 100644 --- a/docs/manuscripts/ds/线性表/2.顺序表示.md +++ b/docs/manuscripts/ds/线性表/2.顺序表示.md @@ -0,0 +1,249 @@ +--- +title: 顺序表示 +#description: +permalink: /manuscripts/ds/linear-table/sequential-representation.html +head: + - [meta, { name: 顺序表示 , content: 顺序表示 }] +--- + + +# 顺序表示 + +## 定义 + +`顺序表`:顺序存储的线性表,**是用一组地址连续的存储单元,依次存储线性表中的数据元素,使得在逻辑上相邻的两个元素在物理位置上也相邻。** + +![](./images/线性表的存储结构.png) + +顺序表中的元素的逻辑顺序与实际的物理位置相同 + +注意: + +- 线性表中的元素的位序是从1开始的,例如1、2、3... +- 数组中的元素的下标是从0开始的,例如0、1、2... + +```c +# define MaxSize 20 // 定义常量MaxSize 用来声明顺序表的最大长度 + +// 线性表结构体定义【ElemType用来代指顺序表中元素的类型,例如高级语言中的int、string....】 +typedef struct{ + ElemType data[MaxSize]; // 顺序表的元素 + int length; // 顺序表的长度 +}SqList + +``` + +### 存储分配 + +`静态分配`:数组的大小和空间都是实现确定好的,一旦存储空间占满就会产生溢出,直接导致程序崩溃。(有点内存不够,宕机重启的意思....) + +`动态分配`:存储数据的空间在程序执行过程中通过`动态存储分配语句`分配的,即便是数据空间占满,也可以另外开辟一块更大的空间,来替换原来的存储空间,满足扩充数据空间的目的。(有点动态规划的意思....)最重要的是:**不需要像静态分配那样,一次性地固定线性表的空间和大小** + +```c +#define InitSize 100 // 表长度初始化 + + +// 动态分配数组顺序表的结构体定义 +typedef struct{ + ElemType *data; // 动态分配数组的指针 + int MaxSize,length; // 数组的最大容量和当前元素个数 +}SqList; + +``` + +动态分配语句 + +```C +// C语言中 + +L.data=(ElemType*)malloc(sizeof(ElemType)*InitSize); + + +// C++ 中 + +L.data=new ElemType[InitSize]; + +``` + +`malloc()函数`: 指针型函数,返回的指针指向该分配域的开头的位置。作用是在内存的动态存储区中分配一个长度为size的连续空间。[百度百科](https://baike.baidu.com/item/malloc%E5%87%BD%E6%95%B0/8582146?fr=aladdin) + +**动态分配不是链式存储,而是属于顺序存储结构**,动态分配的物理结构没有改变,依然是随机存取的方式。只是分配的空间大小可以在运行时决定; + +### 顺序表的特点 + +- 随机访问【这是最主要的特点】,通过存储起始地址和元素序号O(1)时间内访问指定元素。 +- 存储密度高,没有结点只存储数据元素,不像索引存储那样,还需要索引表什么的.. +- 逻辑上相邻的元素物理上也相邻,插入和删除需要移动大量元素 + +## 基本操作 + +### 插入 + +在顺序表L的第i(1≤i≤L.length+1)个位置插入新的元素e + +- 第一步:如果i非法,则直接返回false,插入失败,结束插入过程 +- 第二步:i正常,将表的第i个元素以及后面的所有元素都向右移动一个位置,在腾出来的空位置插入元素e +- 第三步:顺序表插入成功,返回true + +注意:先判空和临界值,提高算法健壮性 + +```cpp + +/* + * @Description: 顺序表的插入操作 + * @Version: Beta1.0 + * @Author: 【B站&公众号】Rong姐姐好可爱 + * @Date: 2020-02-23 07:48:26 + * @LastEditors: 【B站&公众号】Rong姐姐好可爱 + * @LastEditTime: 2020-02-23 07:48:26 + */ +bool ListInsert(SqList &L, int i, ElemType e){ + + // i非法 i=1 表头 i=L.length+1 表尾巴 + if(i<1||i>L.length+1){ + return false; + } + + // 存储空间满,无法插入 + if(L.length >= MaxSize){ + return false; + } + + // 遍历,将位置元素往后移动,注意从后往前循环,避免值被覆盖 + for(int j=L.length; j>=i;j--){ + L.data[j]=L.data[j-1]; + } + + // 此时,表L中的第i个元素和第i+1元素素值一样,将新元素存入i位置即可 + + // 第i个元素,对应的位置角标为i-1 + L.data[i-1]=e; + + // 表长度加1 + L.length++; + + // 返回插入成功 + return true; +} + +``` + +注意:区别顺序表中的位序和角标; + +**时间复杂度** + +![](./images/顺序表插入平均时间复杂度计算.png) + +- 最好情况:在表尾插入,元素向后移动循环没有执行,时间复杂度O(1); +- 最坏情况:在表头插入,元素后移循环执行n次,时间复杂度为O(n); +- 平均情况:随机插入,平均次数为:n/2,对应的平均复杂度为O(n); + +**线性表插入算法的平均时间复杂度为:O(n)** + +> Tips: 需要根据实现代码理解循环为什么是从后往前来实现元素后移,通过for循环可以很明显的看出表尾插入快,表头插入慢 + +#### 删除 + +删除顺序表L中第i(1≤i≤L.length+1)个位置的元素 + +- 成功,返回true,将被删除的元素用引用变量返回; +- 失败,返回false + +```cpp + +/* + * @Description: 顺序表的删除操作 + * @Version: Beta1.0 + * @Author: 【B站&公众号】Rong姐姐好可爱 + * @Date: 2020-02-23 07:48:26 + * @LastEditors: 【B站&公众号】Rong姐姐好可爱 + * @LastEditTime: 2020-02-23 07:48:26 + */ +bool ListDelete(SqList &L, int i, ElemType &e){ + + // i非法 i=1 表头 i=L.length+1 表尾巴 + if(i<1||i>L.length+1){ + return false; + } + + // 存储空间满,无法插入 + if(L.length >= MaxSize){ + return false; + } + + // 引用变量e赋值 + e=L.data[i-1] + + // 遍历,第i个元素后面的往前移动 + for(int j=i; j<=L.length;j++){ + // 从第i个元素开始,角标从i-1开始 + L.data[j-1]=L.data[j]; + } + + // 此时,表L中的表尾元素和倒数第二个元素值一样,将表的长度-1 + + // 表长度减1 + L.length--; + + // 返回删除成功 + return true; +} + +``` + +从这里来看,删除、插入元素都会涉及到大量的元素的移动(最好情况例外),总结而言: + +- 元素从后往前移,循环从前往后遍历 +- 元素从前往后移,循环从后往前遍历 + +**时间复杂度:** + +![](./images/顺序表随机删除元素的平均复杂度计算.png) + +- 最好情况:删除表尾元素,不需要移动任何元素,时间复杂度为O(1); +- 最坏情况:删除表头元素,需要移动除第一个元素外的所有元素,时间复杂度为O(n); +- 平均情况:随机删除,平均需要(n-1)/2,对应的时间复杂度为O(n); + +**线性表删除算法的平均时间复杂度为O(n);** + +### 按值查找(顺序查找) + +在顺序表L中查找第一个元素值等于e的元素,并返回位序 + +```cpp +/* + * @Description: 顺序表的按值查找(顺序查找) + * @Version: Beta1.0 + * @Author: 【B站&公众号】Rong姐姐好可爱 + * @Date: 2020-02-23 07:48:26 + * @LastEditors: 【B站&公众号】Rong姐姐好可爱 + * @LastEditTime: 2020-02-23 07:48:26 + */ +int LocateElem(SqList L,ElemType e){ + int i; + // 循环判断 + for(i=0;i 借助数组来描述线性表的链式存储结构,结点元素同样存在数据域`data`和指针域`next` diff --git a/docs/manuscripts/ds/线性表/4.总结.md b/docs/manuscripts/ds/线性表/4.总结.md index 0c54846..239a881 100644 --- a/docs/manuscripts/ds/线性表/4.总结.md +++ b/docs/manuscripts/ds/线性表/4.总结.md @@ -1,7 +1,7 @@ --- title: 链式表示 #description: -permalink: /manuscripts/ds/linear-table-summary.html +permalink: /manuscripts/ds/linear-table/summary.html head: - [meta, { name: 数据结构 , content: 线性表总结 }] --- diff --git a/docs/manuscripts/ds/线性表/images/带头结点的单链表.png b/docs/manuscripts/ds/线性表/images/带头结点的单链表.png new file mode 100644 index 0000000..901f010 Binary files /dev/null and b/docs/manuscripts/ds/线性表/images/带头结点的单链表.png differ diff --git a/docs/manuscripts/ds/线性表/images/线性表按值查找平均时间复杂度计算.png b/docs/manuscripts/ds/线性表/images/线性表按值查找平均时间复杂度计算.png new file mode 100644 index 0000000..8416f58 Binary files /dev/null and b/docs/manuscripts/ds/线性表/images/线性表按值查找平均时间复杂度计算.png differ diff --git a/docs/manuscripts/ds/线性表/images/线性表的存储结构.png b/docs/manuscripts/ds/线性表/images/线性表的存储结构.png new file mode 100644 index 0000000..a1dd540 Binary files /dev/null and b/docs/manuscripts/ds/线性表/images/线性表的存储结构.png differ diff --git a/docs/manuscripts/ds/线性表/images/静态链表存储结构.png b/docs/manuscripts/ds/线性表/images/静态链表存储结构.png new file mode 100644 index 0000000..e104a7a Binary files /dev/null and b/docs/manuscripts/ds/线性表/images/静态链表存储结构.png differ diff --git a/docs/manuscripts/ds/线性表/images/顺序表插入平均时间复杂度计算.png b/docs/manuscripts/ds/线性表/images/顺序表插入平均时间复杂度计算.png new file mode 100644 index 0000000..0eede62 Binary files /dev/null and b/docs/manuscripts/ds/线性表/images/顺序表插入平均时间复杂度计算.png differ diff --git a/docs/manuscripts/ds/线性表/images/顺序表随机删除元素的平均复杂度计算.png b/docs/manuscripts/ds/线性表/images/顺序表随机删除元素的平均复杂度计算.png new file mode 100644 index 0000000..020bbda Binary files /dev/null and b/docs/manuscripts/ds/线性表/images/顺序表随机删除元素的平均复杂度计算.png differ diff --git a/docs/job-poster-bytedance.md b/docs/manuscripts/job-poster-bytedance.md similarity index 99% rename from docs/job-poster-bytedance.md rename to docs/manuscripts/job-poster-bytedance.md index 4d7b322..f324426 100644 --- a/docs/job-poster-bytedance.md +++ b/docs/manuscripts/job-poster-bytedance.md @@ -1,3 +1,8 @@ +--- +title: 工作机会 +permalink: /manuscripts/job-poster-bytedance.html +--- + # 工作机会 ### 字节工作内推 diff --git a/docs/manuscripts/mark-map/ccp-map.html b/docs/manuscripts/mark-map/ccp-map.html new file mode 100644 index 0000000..514f3a0 --- /dev/null +++ b/docs/manuscripts/mark-map/ccp-map.html @@ -0,0 +1,40 @@ + + + + + + +Markmap + + + + + + + + diff --git a/docs/manuscripts/mark-map/ccp-map.md b/docs/manuscripts/mark-map/ccp-map.md index 26db8df..1fc680f 100644 --- a/docs/manuscripts/mark-map/ccp-map.md +++ b/docs/manuscripts/mark-map/ccp-map.md @@ -1,3 +1,8 @@ +--- +title: 计算机组成原理 +permalink: /manuscripts/mark-map/ccp-map.html +headerDepth: 3 +--- # 计算机组成原理 在线预览 diff --git a/docs/manuscripts/mark-map/cn-map.html b/docs/manuscripts/mark-map/cn-map.html new file mode 100644 index 0000000..d73bb1e --- /dev/null +++ b/docs/manuscripts/mark-map/cn-map.html @@ -0,0 +1,40 @@ + + + + + + +Markmap + + + + + + + + diff --git a/docs/manuscripts/mark-map/cn-map.md b/docs/manuscripts/mark-map/cn-map.md index d6420c1..e761f9a 100644 --- a/docs/manuscripts/mark-map/cn-map.md +++ b/docs/manuscripts/mark-map/cn-map.md @@ -1,3 +1,9 @@ +--- +title: 计算机网络 +permalink: /manuscripts/mark-map/cn-map.html +headerDepth: 3 +--- + # 计算机网络 在线预览 diff --git a/docs/manuscripts/mark-map/ds-map.html b/docs/manuscripts/mark-map/ds-map.html new file mode 100644 index 0000000..43fc3fa --- /dev/null +++ b/docs/manuscripts/mark-map/ds-map.html @@ -0,0 +1,40 @@ + + + + + + +Markmap + + + + + + + + diff --git a/docs/manuscripts/mark-map/ds-map.md b/docs/manuscripts/mark-map/ds-map.md index db915a1..fe1e2dc 100644 --- a/docs/manuscripts/mark-map/ds-map.md +++ b/docs/manuscripts/mark-map/ds-map.md @@ -1,3 +1,9 @@ +--- +title: 数据结构 +permalink: /manuscripts/mark-map/ds-map.html +headerDepth: 3 +--- + # 数据结构 在线预览 diff --git a/docs/manuscripts/mark-map/os-map.html b/docs/manuscripts/mark-map/os-map.html new file mode 100644 index 0000000..5a772df --- /dev/null +++ b/docs/manuscripts/mark-map/os-map.html @@ -0,0 +1,40 @@ + + + + + + +Markmap + + + + + + + + diff --git a/docs/manuscripts/mark-map/os-map.md b/docs/manuscripts/mark-map/os-map.md index 6959bac..3b955f2 100644 --- a/docs/manuscripts/mark-map/os-map.md +++ b/docs/manuscripts/mark-map/os-map.md @@ -1,3 +1,9 @@ +--- +title: 操作系统 +permalink: /manuscripts/mark-map/os-map.html +headerDepth: 3 +--- + # 操作系统 在线预览 diff --git a/docs/manuscripts/mark-map/readme.html b/docs/manuscripts/mark-map/readme.html new file mode 100644 index 0000000..ab0ffbc --- /dev/null +++ b/docs/manuscripts/mark-map/readme.html @@ -0,0 +1,40 @@ + + + + + + +Markmap + + + + + + + + diff --git a/docs/manuscripts/os/readme.md b/docs/manuscripts/os/readme.md index 36f6f44..8812d6b 100644 --- a/docs/manuscripts/os/readme.md +++ b/docs/manuscripts/os/readme.md @@ -1,3 +1,8 @@ +--- +title: 操作系统 +permalink: /manuscripts/os.html +--- + # 操作系统 ```mindmap diff --git a/docs/manuscripts/os/内存管理/1.引论.md b/docs/manuscripts/os/内存管理/1.引论.md index f95d628..9ac208f 100644 --- a/docs/manuscripts/os/内存管理/1.引论.md +++ b/docs/manuscripts/os/内存管理/1.引论.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/os/memory-manage/base-concept.html +--- + # 引论 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/内存管理/2.虚拟内存.md b/docs/manuscripts/os/内存管理/2.虚拟内存.md index 79f6430..854a4dc 100644 --- a/docs/manuscripts/os/内存管理/2.虚拟内存.md +++ b/docs/manuscripts/os/内存管理/2.虚拟内存.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/os/memory-manage/virtual-memory.html +--- + # 虚拟内存 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/内存管理/3.一些总结.md b/docs/manuscripts/os/内存管理/3.一些总结.md index b78efa4..3265a0e 100644 --- a/docs/manuscripts/os/内存管理/3.一些总结.md +++ b/docs/manuscripts/os/内存管理/3.一些总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/os/memory-manage/summary.html +--- + # 一些总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/文件管理/1.基本概念.md b/docs/manuscripts/os/文件管理/1.基本概念.md index 8788987..a372370 100644 --- a/docs/manuscripts/os/文件管理/1.基本概念.md +++ b/docs/manuscripts/os/文件管理/1.基本概念.md @@ -1,3 +1,8 @@ +--- +title: 基本概念 +permalink: /manuscripts/os/file-manage/base-concept.html +--- + # 基本概念 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/文件管理/2.文件系统.md b/docs/manuscripts/os/文件管理/2.文件系统.md index e13514b..2e6df54 100644 --- a/docs/manuscripts/os/文件管理/2.文件系统.md +++ b/docs/manuscripts/os/文件管理/2.文件系统.md @@ -1,3 +1,8 @@ +--- +title: 文件系统 +permalink: /manuscripts/os/file-manage/file-system.html +--- + # 文件系统 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/文件管理/3.磁盘管理.md b/docs/manuscripts/os/文件管理/3.磁盘管理.md index 02200ad..54dd389 100644 --- a/docs/manuscripts/os/文件管理/3.磁盘管理.md +++ b/docs/manuscripts/os/文件管理/3.磁盘管理.md @@ -1,3 +1,9 @@ +--- +title: 文件系统 +permalink: /manuscripts/os/file-manage/disk-manage.html +--- + + # 磁盘管理 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/文件管理/4.一些总结.md b/docs/manuscripts/os/文件管理/4.一些总结.md index b78efa4..4faf859 100644 --- a/docs/manuscripts/os/文件管理/4.一些总结.md +++ b/docs/manuscripts/os/文件管理/4.一些总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/os/file-manage/summary.html +--- + # 一些总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/系统概述/1.操作系统引论.md b/docs/manuscripts/os/系统概述/1.操作系统引论.md index 2892565..004e5a9 100644 --- a/docs/manuscripts/os/系统概述/1.操作系统引论.md +++ b/docs/manuscripts/os/系统概述/1.操作系统引论.md @@ -1,3 +1,8 @@ +--- +title: 操作系统引论 +permalink: /manuscripts/os/system-introduce/os-intro.html +--- + # 操作系统引论 ## 目标和作用 diff --git a/docs/manuscripts/os/系统概述/2.发展和分类.md b/docs/manuscripts/os/系统概述/2.发展和分类.md index 7553e9b..957763d 100644 --- a/docs/manuscripts/os/系统概述/2.发展和分类.md +++ b/docs/manuscripts/os/系统概述/2.发展和分类.md @@ -1,3 +1,8 @@ +--- +title: 发展和分类 +permalink: /manuscripts/os/system-introduce/development-class.html +--- + # 发展和分类 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/系统概述/3.运行环境.md b/docs/manuscripts/os/系统概述/3.运行环境.md index 8b9c0fe..9a1d081 100644 --- a/docs/manuscripts/os/系统概述/3.运行环境.md +++ b/docs/manuscripts/os/系统概述/3.运行环境.md @@ -1,3 +1,8 @@ +--- +title: 运行环境 +permalink: /manuscripts/os/system-introduce/running-env.html +--- + # 运行环境 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/系统概述/4.体系结构.md b/docs/manuscripts/os/系统概述/4.体系结构.md index aa3d473..535ecf7 100644 --- a/docs/manuscripts/os/系统概述/4.体系结构.md +++ b/docs/manuscripts/os/系统概述/4.体系结构.md @@ -1,3 +1,8 @@ +--- +title: 体系结构 +permalink: /manuscripts/os/system-introduce/architecture.html +--- + # 体系结构 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/输入、输出管理/1.基本概述.md b/docs/manuscripts/os/输入、输出管理/1.基本概述.md index 44685a5..bac43ae 100644 --- a/docs/manuscripts/os/输入、输出管理/1.基本概述.md +++ b/docs/manuscripts/os/输入、输出管理/1.基本概述.md @@ -1,3 +1,8 @@ +--- +title: 基本概述 +permalink: /manuscripts/os/in-out/base-concept.html +--- + # 基本概述 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/输入、输出管理/2.核心子系统.md b/docs/manuscripts/os/输入、输出管理/2.核心子系统.md index d033f4c..fc0c49c 100644 --- a/docs/manuscripts/os/输入、输出管理/2.核心子系统.md +++ b/docs/manuscripts/os/输入、输出管理/2.核心子系统.md @@ -1,3 +1,8 @@ +--- +title: 核心子系统 +permalink: /manuscripts/os/in-out/core-subsystem.html +--- + # 核心子系统 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/输入、输出管理/3.高速缓存和缓冲区.md b/docs/manuscripts/os/输入、输出管理/3.高速缓存和缓冲区.md index 56425b2..fd48c4e 100644 --- a/docs/manuscripts/os/输入、输出管理/3.高速缓存和缓冲区.md +++ b/docs/manuscripts/os/输入、输出管理/3.高速缓存和缓冲区.md @@ -1,3 +1,8 @@ +--- +title: 高速缓存和缓冲区 +permalink: /manuscripts/os/in-out/cache-buffer.html +--- + # 高速缓存和缓冲区 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/输入、输出管理/4.一些总结.md b/docs/manuscripts/os/输入、输出管理/4.一些总结.md index b78efa4..5315768 100644 --- a/docs/manuscripts/os/输入、输出管理/4.一些总结.md +++ b/docs/manuscripts/os/输入、输出管理/4.一些总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/os/in-out/summary.html +--- + # 一些总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/进程管理/1.进程和线程.md b/docs/manuscripts/os/进程管理/1.进程和线程.md index 3fc49ef..1c49654 100644 --- a/docs/manuscripts/os/进程管理/1.进程和线程.md +++ b/docs/manuscripts/os/进程管理/1.进程和线程.md @@ -1,3 +1,8 @@ +--- +title: 进程和线程 +permalink: /manuscripts/os/processes-manage/processes-thread.html +--- + # 进程和线程 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/进程管理/2.处理机调度.md b/docs/manuscripts/os/进程管理/2.处理机调度.md index f173f20..306a347 100644 --- a/docs/manuscripts/os/进程管理/2.处理机调度.md +++ b/docs/manuscripts/os/进程管理/2.处理机调度.md @@ -1,3 +1,8 @@ +--- +title: 处理机调度 +permalink: /manuscripts/os/processes-manage/cpu-dispatch.html +--- + # 处理机调度 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/进程管理/3.进程同步.md b/docs/manuscripts/os/进程管理/3.进程同步.md index 02a331d..c776286 100644 --- a/docs/manuscripts/os/进程管理/3.进程同步.md +++ b/docs/manuscripts/os/进程管理/3.进程同步.md @@ -1,3 +1,8 @@ +--- +title: 进程同步 +permalink: /manuscripts/os/processes-manage/process-sync.html +--- + # 进程同步 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/进程管理/4.死锁.md b/docs/manuscripts/os/进程管理/4.死锁.md index 04ef5a9..2fa0a17 100644 --- a/docs/manuscripts/os/进程管理/4.死锁.md +++ b/docs/manuscripts/os/进程管理/4.死锁.md @@ -1,3 +1,8 @@ +--- +title: 死锁 +permalink: /manuscripts/os/processes-manage/dead-lock.html +--- + # 死锁 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/os/进程管理/5.一些总结.md b/docs/manuscripts/os/进程管理/5.一些总结.md index b78efa4..99af80b 100644 --- a/docs/manuscripts/os/进程管理/5.一些总结.md +++ b/docs/manuscripts/os/进程管理/5.一些总结.md @@ -1,3 +1,8 @@ +--- +title: 一些总结 +permalink: /manuscripts/os/processes-manage/summary.html +--- + # 一些总结 努力赶稿中,等等我呀... diff --git a/docs/manuscripts/quickCreateMdFile.js b/docs/manuscripts/quickCreateMdFile.js index 7a6ce63..c1a9fb1 100644 --- a/docs/manuscripts/quickCreateMdFile.js +++ b/docs/manuscripts/quickCreateMdFile.js @@ -64,4 +64,3 @@ const { prefix, children } = sideBarData; } } })() - diff --git a/docs/manuscripts/readme.md b/docs/manuscripts/readme.md deleted file mode 100644 index 7e4ad18..0000000 --- a/docs/manuscripts/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# 408冲 - - diff --git a/docs/wechat-list.md b/docs/manuscripts/wechat-list.md similarity index 99% rename from docs/wechat-list.md rename to docs/manuscripts/wechat-list.md index 2b2cca2..57e43a9 100644 --- a/docs/wechat-list.md +++ b/docs/manuscripts/wechat-list.md @@ -1,3 +1,8 @@ +--- +title: 公众号汇总 +permalink: /manuscripts/wechat-list.html +--- + # 公众号汇总 ## 2021年 diff --git a/docs/quick-start.md b/docs/quick-start.md index c2c2b8c..33ba19c 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -1,25 +1,8 @@ +--- +title: 快速开始 +permalink: /quick-start.html +headerDepth: 2 +--- # 快速开始 -
-
- - 关注公众号 - 联系作者 -
-
-
- -## 写在最前面 - -**缺少有效访问链接的代表尚未完成,大家善用快捷键`Ctrl+F`** - -## 学习建议 - -- 注意学科学习顺序,建议:数据结构 --> 操作系统、计组并行 --> 计算机网络 -- 学习切忌浮于表面,戒骄戒躁。408考试知识点多、杂,非常容易忘,**抓大放小、先易后难、反复多次** + \ No newline at end of file diff --git a/docs/readme.md b/docs/readme.md index 4000ffe..bf5c75b 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -2,13 +2,16 @@ home: true title: 首页 heroText: 计算机应试全家桶 -tagline: 保持终身学习,读研or考研,做适合自己的选择! +tagline: 保持终身学习,读研or工作,做适合自己的选择! actions: - text: 快速开始→ link: /quick-start.md type: primary + - text: 微信公众号 + link: /manuscripts/wechat-list.md + type: secondary - text: 工作机会 💡 - link: /job-poster-bytedance.md + link: /manuscripts/job-poster-bytedance.md type: secondary features: - title: 多学科笔记 @@ -19,21 +22,12 @@ features: details: 官方插件的基础上,抽象、封装出适合自己功能的plus插件,能够快速集成、使用在新的项目中。 - title: 反复、多次 details: 通过以项目Demo示例的方式,对框架常用的功能进行Code编写和整理,提供有效且易用的代码封装。 -# - title: 王道论坛 -# details: 全平台都可以关注。 -# link: https://github.com/zpfz/vuepress-theme-antdocs -# - title: 研招网 -# link: https://github.com/zpfz/vuepress-theme-antdocs -# details: 考研最新消息。 -# - title: 开源共享 -# link: https://github.com/zpfz/vuepress-theme-antdocs -# details: 通过以项目Demo示例的方式,对框架常用的功能进行Code编写和整理,提供有效且易用的代码封装。 --- -### 本地浏览【推荐】 +## 本地浏览【推荐】 由于平台、网络等原因,在线浏览容易出现加载面、加载不出来等常见问题,因此非常建议在本地进行浏览、学习;**下面指令默认你已经安装[Git](https://git-scm.com/download)、[NPM](https://www.npmjs.com/)、[PNPM](https://www.pnpm.cn/)、[Yarn](https://yarn.bootcss.com/)、[Node](http://nodejs.cn)等环境,并对此有一定了解!** @@ -85,7 +79,7 @@ npm run dev git clone https://github.com/mmdapl/408CSFamily.git ## 进入408CSFamily文件夹中 -cd 408CSFamily/ +cd 408CSFamily ## tips: 如果本地已经clone过仓库,建议执行pull指令,获取最新 git pull @@ -102,128 +96,15 @@ yarn run dev 查看项目启动日志并访问:[http://127.0.0.1:4200](http://localhost:4200),开启学习之旅吧~ -### 在线浏览 +## 在线浏览 - 稳定版: -> 网站无法访问时,建议通过科学上网访问备用网络 +> 网站无法访问时,合理使用魔法通过科学上网访问第三方托管平台 - Github: - Netlify: - Vercel: -### 提交记录 - -### 赞赏列表 - -以下排名不分先后! **赞赏过的一定要微信跟我说呀!!!!!!** - - - -### 赞助商 - -以下排名不分先后! 还木有收到赞助,哈哈哈,先留坑 - -### 贡献 - -感谢向仓库提交mr的所有开发者 - -[![contributors](https://contrib.rocks/image?repo=142vip/408CSFamily)](https://github.com/142vip/408CSFamily/graphs/contributors) - -### 趋势 - -
-Star History -
- -### 联系作者 - -若系列文章对你有所帮助,欢迎订阅公众号或微信”骚扰“,获取更多内容。**商务合作请备注来意** - -
-
- - 关注公众号 - 联系作者 -
-
- -
-
- - 作者: 储凡 - -
- -
-
- -交流/加群/互看朋友圈, -当然:**聊天 /提问 /建议 /提需求** 可以在公众号直接**私信**,后台可以看到。有时间即会回复,偶尔的延迟和疏漏还请小伙伴们谅解,蟹蟹。 +[//]: # (自动引入首页) + \ No newline at end of file