{"id":29924945,"url":"https://github.com/ascendho/data-structures","last_synced_at":"2025-08-02T11:08:52.660Z","repository":{"id":176953660,"uuid":"655530571","full_name":"ascendho/Data-Structures","owner":"ascendho","description":"📓《数据结构》(双色版)- 严蔚敏\u0026李冬梅 - 教材源码、习题全解、实验项目、笔记等✨","archived":false,"fork":false,"pushed_at":"2024-03-11T12:35:48.000Z","size":81038,"stargazers_count":45,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T08:47:49.865Z","etag":null,"topics":["data-structure","ds","yanweimin"],"latest_commit_sha":null,"homepage":"https://www.ryjiaoyu.com/book/details/45170","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ascendho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-06-19T05:03:39.000Z","updated_at":"2025-03-30T15:49:29.000Z","dependencies_parsed_at":"2024-03-11T13:42:03.108Z","dependency_job_id":null,"html_url":"https://github.com/ascendho/Data-Structures","commit_stats":null,"previous_names":["ascendho/ky-ds","ascendho/data-structures"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ascendho/Data-Structures","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2FData-Structures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2FData-Structures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2FData-Structures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2FData-Structures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ascendho","download_url":"https://codeload.github.com/ascendho/Data-Structures/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2FData-Structures/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378806,"owners_count":24240896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-structure","ds","yanweimin"],"created_at":"2025-08-02T11:08:51.047Z","updated_at":"2025-08-02T11:08:52.636Z","avatar_url":"https://github.com/ascendho.png","language":"C++","readme":"---\ntypora-copy-images-to: ./img\n---\n\n## 文件说明\n\n- \u003ca href=\"\"\u003eSupplement\u003c/a\u003e：存放算法动画、课件、课程设计数据集、勘误表以及Word版答案\n\n- 其余文件内容不言自明\n\n------\n\n\n\n## 教材源码 Source Code\n\n- 第二章：\u003ca href=\"02-Linear List\\TextBook\\01_SqList\\SqList.cpp\"\u003e顺序表\u003c/a\u003e、\u003ca href=\"02-Linear List\\TextBook\\02_LinkList\\LinkList.cpp\"\u003e单链表\u003c/a\u003e、\u003ca href=\"02-Linear List\\TextBook\\04_DuLinkList\\DuLinkList.cpp\"\u003e双向链表\u003c/a\u003e、\u003ca href=\"02-Linear List\\TextBook\\05_Union\\Union.cpp\"\u003e合并线性表\u003c/a\u003e、\u003ca href=\"02-Linear List\\TextBook\\06_MergeList\\MergeList.cpp\"\u003e合并有序表\u003c/a\u003e、\u003ca href=\"02-Linear List/Applied Case/Polynomial/Polynomial.cpp\"\u003e一元多项式\u003c/a\u003e\n\n- 第三章：\u003ca href=\"03-Stack_Queue/TextBook/01_SqStack/SqStack.cpp\"\u003e顺序栈\u003c/a\u003e、\u003ca href=\"03-Stack_Queue/TextBook/02_LinkStack/LinkStack.cpp\"\u003e链栈\u003c/a\u003e、\u003ca href=\"03-Stack_Queue/TextBook/03_StackAndRecursion/StackAndRecursion.cpp\"\u003e栈与递归\u003c/a\u003e、\u003ca href=\"03-Stack_Queue/TextBook/04_SqQueue/SqQueue.cpp\"\u003e循环队列\u003c/a\u003e、\u003ca href=\"03-Stack_Queue/TextBook/05_LinkQueue/LinkQueue.cpp\"\u003e链队\u003c/a\u003e、\u003ca href=\"03-Stack_Queue\\Applied Case\\Conversion\\Conversion.cpp\"\u003e数制转换\u003c/a\u003e、\u003ca href=\"03-Stack_Queue/Applied Case/Matching/Matching.cpp\"\u003e括号匹配\u003c/a\u003e、\u003ca href=\"03-Stack_Queue/Applied Case/EvaluateExpression/EvaluateExpression.cpp\"\u003e表达式求值\u003c/a\u003e、\u003ca href=\"03-Stack_Queue/Applied Case/DancePartner/DancePartner.cpp\"\u003e舞伴问题\u003c/a\u003e\n\n- 第四章：\u003ca href=\"04-String_ Array_Generalized List\\TextBook\\02_Index_BF\\Index_BF.cpp\"\u003eBF算法\u003c/a\u003e、\u003ca href=\"04-String_ Array_Generalized List\\TextBook\\03_next\\next.cpp\"\u003enext函数值\u003c/a\u003e、\u003ca href=\"04-String_ Array_Generalized List\\TextBook\\04_Index_KMP\\Index_KMP.cpp\"\u003eKMP算法\u003c/a\u003e、\u003ca href=\"04-String_ Array_Generalized List\\TextBook\\05_nextval\\nextval.cpp\"\u003enextval修正值\u003c/a\u003e、\u003ca href=\"04-String_ Array_Generalized List\\Applied Case\\Virus_detection\\Virus_detection.cpp\"\u003e病毒感染检测\u003c/a\u003e\n\n- 第五章：\u003ca href=\"05-Tree_Binary Tree/TextBook/01_BiTree/BiTree.cpp\"\u003e二叉树\u003c/a\u003e、\u003ca href=\"05-Tree_Binary Tree\\TextBook\\02_BiThrTree\\BiThrTree.cpp\"\u003e线索二叉树\u003c/a\u003e、\u003ca href=\"05-Tree_Binary Tree/Applied Case/DataCompression/HuffmanTree.cpp\"\u003e数据压缩\u003c/a\u003e、\u003ca href=\"05-Tree_Binary Tree\\Applied Case\\BinaryTreeComputeExp\\ComputeExpression.cpp\"\u003e表达式树求值\u003c/a\u003e\n\n- 第六章：\u003ca href=\"06-Graph/TextBook/01_AdjacencyMatrix/AdjacencyMatrix.cpp\"\u003e邻接矩阵\u003c/a\u003e、\u003ca href=\"06-Graph/TextBook/02_AdjacencyList/AdjacencyList.cpp\"\u003e邻接表\u003c/a\u003e、\u003ca href=\"06-Graph/TextBook/03_DFS/DFS.cpp\"\u003eDFS遍历\u003c/a\u003e、\u003ca href=\"06-Graph\\TextBook\\04_BFS\\BFS.cpp\"\u003eBFS遍历\u003c/a\u003e、\u003ca href=\"06-Graph/TextBook/05_MinimumCostSpanningTree/MinimumCostSpanningTree.cpp\"\u003e最小生成树\u003c/a\u003e、\u003ca href=\"06-Graph/TextBook/06_ShortestPath/ShortestPath.cpp\"\u003e最短路径\u003c/a\u003e、\u003ca href=\"06-Graph/TextBook/07_TopologicalSort/TopologicalSort.cpp\"\u003e拓扑排序\u003c/a\u003e、\u003ca href=\"06-Graph/TextBook/08_CriticalPath/CriticalPath.cpp\"\u003e关键路径\u003c/a\u003e、\u003ca href=\"06-Graph/Applied Case/SixDegreeSeparation/SixDegree_BFS.cpp\"\u003e六度空间\u003c/a\u003e\n\n- 第七章：\u003ca href=\"07-Searching/TextBook/01_Search_Seq/Search_Seq.cpp\"\u003e顺序查找\u003c/a\u003e、\u003ca href=\"07-Searching/TextBook/02_Search_Bin/Search_Bin.cpp\"\u003e折半查找\u003c/a\u003e、\u003ca href=\"07-Searching/TextBook/03_BSTree/BSTree.cpp\"\u003e二叉排序树\u003c/a\u003e、\u003ca href=\"07-Searching/TextBook/04_B- Tree/B_Tree.cpp\"\u003eB-树\u003c/a\u003e、\u003ca href=\"07-Searching/TextBook/05_HashTable/HashTable.cpp\"\u003e散列查找\u003c/a\u003e\n\n- 第八章：\u003ca href=\"08-Sorting/TextBook/01_InsertSort/InsertSort.cpp\"\u003e直接插入\u003c/a\u003e、\u003ca href=\"08-Sorting/TextBook/02_BInsertSort/BInsertSort.cpp\"\u003e折半插入\u003c/a\u003e、\u003ca href=\"08-Sorting/TextBook/03_ShellSort/ShellSort.cpp\"\u003e希尔排序\u003c/a\u003e、\u003ca href=\"08-Sorting/TextBook/04_BubbleSort/BubbleSort.cpp\"\u003e起泡排序\u003c/a\u003e、\u003ca href=\"08-Sorting/TextBook/05_QuickSort/QuickSort.cpp\"\u003e快速排序\u003c/a\u003e、\u003ca href=\"08-Sorting/TextBook/06_SelectSort/SelectSort.cpp\"\u003e简单选择\u003c/a\u003e、\u003ca href=\"08-Sorting/TextBook/07_HeapSort/HeapSort.cpp\"\u003e堆排序\u003c/a\u003e、\u003ca href=\"08-Sorting/TextBook/08_MergeSort/MergeSort.cpp\"\u003e归并排序\u003c/a\u003e、\u003ca href=\"08-Sorting/TextBook/09_RadixSort/RadixSort.cpp\"\u003e基数排序\u003c/a\u003e\n\n------\n\n\n\n## 编程题解 Solutions\n\n|                            线性表                            |                           栈和队列                           |                       串、数组和广义表                       |                          树和二叉树                          |  图  |                             查找                             | 排序 |\n| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :--: | :----------------------------------------------------------: | :--: |\n| \u003ca href=\"02-Linear List/Exercise/2.1_MergeList/MergeList.cpp\"\u003e2.1\u003c/a\u003e | \u003ca href=\"03-Stack_Queue/Exercise/3.1_DblStack/DblStack.cpp\"\u003e3.1\u003c/a\u003e | \u003ca href=\"04-String_ Array_Generalized List/Exercise/4.1_CharacterFrequencyStatistics/CharacterFrequencyStatistics.cpp\"\u003e4.1\u003c/a\u003e |                                                              |      | \u003ca href=\"07-Searching/Exercise/7.1_BinSearch_Cur/BinSearch_Cur.cpp\"\u003e7.1\u003c/a\u003e |      |\n| \u003ca href=\"02-Linear List/Exercise/2.2_MergeList/MergeList.cpp\"\u003e2.2\u003c/a\u003e | \u003ca href=\"03-Stack_Queue\\Exercise\\3.2_IsPalindrome\\IsPalindrome.cpp\"\u003e3.2\u003c/a\u003e | \u003ca href=\"04-String_ Array_Generalized List/Exercise/4.2_Inverse/Inverse.cpp\"\u003e4.2\u003c/a\u003e |                                                              |      |                                                              |      |\n| \u003ca href=\"02-Linear List/Exercise/2.3_Intersection/Intersection.cpp\"\u003e2.3\u003c/a\u003e | \u003ca href=\"03-Stack_Queue/Exercise/3.3_InOutS/InOutS.cpp\"\u003e3.3\u003c/a\u003e | \u003ca href=\"04-String_ Array_Generalized List\\Exercise\\4.3_Insert\\Insert.cpp\"\u003e4.3\u003c/a\u003e |                                                              |      |                                                              |      |\n| \u003ca href=\"02-Linear List\\Exercise\\2.4_Difference\\Difference.cpp\"\u003e2.4\u003c/a\u003e | \u003ca href=\"03-Stack_Queue/Exercise/3.4_Postfix/Postfix.cpp\"\u003e3.4\u003c/a\u003e | \u003ca href=\"04-String_ Array_Generalized List/Exercise/4.4_Format/Format.cpp\"\u003e4.4\u003c/a\u003e |                                                              |      |                                                              |      |\n| \u003ca href=\"02-Linear List/Exercise/2.5_Decompose/Decompose.cpp\"\u003e2.5\u003c/a\u003e | \u003ca href=\"03-Stack_Queue/Exercise/3.5_Judge/Judge.cpp\"\u003e3.5\u003c/a\u003e | \u003ca href=\"04-String_ Array_Generalized List/Exercise/4.5_IsEqual/isEqual.cpp\"\u003e4.5\u003c/a\u003e |                                                              |      |                                                              |      |\n|  \u003ca href=\"02-Linear List\\Exercise\\2.6_Max\\Max.cpp\"\u003e2.6\u003c/a\u003e   | \u003ca href=\"03-Stack_Queue/Exercise/3.6_LinkQueue/LinkQueue.cpp\"\u003e3.6\u003c/a\u003e | \u003ca href=\"04-String_ Array_Generalized List/Exercise/4.6_Partition/Partition.cpp\"\u003e4.6\u003c/a\u003e | \u003ca href=\"05-Tree_Binary Tree/Exercise/5.6_LevelOrderTraversal/LevelOrderTraversal.cpp\"\u003e5.6\u003c/a\u003e |      |                                                              |      |\n| \u003ca href=\"02-Linear List\\Exercise\\2.7_Inverse\\Inverse.cpp\"\u003e2.7\u003c/a\u003e | \u003ca href=\"03-Stack_Queue/Exercise/3.7_SqQueueWithTag/SqQueueWithTag.cpp\"\u003e3.7\u003c/a\u003e |                                                              |                                                              |      |                                                              |      |\n| \u003ca href=\"02-Linear List\\Exercise\\2.8_DeleteMinMax\\DeleteMinMax.cpp\"\u003e2.8\u003c/a\u003e | \u003ca href=\"03-Stack_Queue/Exercise/3.8_Deque/Deque.cpp\"\u003e3.8\u003c/a\u003e |                                                              |                                                              |      |                                                              |      |\n| \u003ca href=\"02-Linear List/Exercise/2.9_Exchange/Exchange.cpp\"\u003e2.9\u003c/a\u003e |  \u003ca href=\"03-Stack_Queue/Exercise/3.9_Ack/Ack.cpp\"\u003e3.9\u003c/a\u003e   |                                                              |                                                              |      |                                                              |      |\n| \u003ca href=\"02-Linear List/Exercise/2.10_DeleteItem/DeleteItem.cpp\"\u003e2.10\u003c/a\u003e | \u003ca href=\"03-Stack_Queue/Exercise/3.10_RecursionInLinkList/RecursionInLinkList.cpp\"\u003e3.10\u003c/a\u003e |                                                              |                                                              |      |                                                              |      |\n\n------\n\n\n\n## 如何使用 How to use\n\n1. 选用**CLion**(大学生可申请使用免费的教育版本)集成开发环境，配置好C++开发环境\n\n2. 点击该仓库的`Code`绿色按钮，然后点击`Download ZIP`或者直接使用**终端**下载：\n\n```bash\ngit clone https://github.com/ascendho/KY-DS.git\n```\n\n![](img/C0J__QFOH%5D4RD%7D%5BU%7DHYWV@B.png)\n\n3. 解压，然后选中要打开的文件夹，右键选中`Open Folder as CLion Project`\n\n![1](img/1.png)\n\n------\n\n\n\n## 常见问题 FAQ\n\n\u003e Q1：源码后缀是cpp，所以需要学习完了c++才能看懂吗？\n\u003e\n\u003e 答：不，虽然后缀名是cpp，但是也主要是为了使用c++语言的传引用特性以及与严书的\"类C语言\"同步，教材源码中不会引入其他的c++语言特性，而在部分题解中，为了类型适配方便，会视情况使用标准库`stl`里面的数据结构，但不影响程序逻辑的理解(相反，事实上恰恰方便了程序的理解)。基于此，你只需要基本掌握c语言，就能看懂代码\n\u003e\n\u003e \n\u003e\n\u003e Q2：我可以不使用CLion，采用其他IDE吗？\n\u003e\n\u003e 答：当然可以，只不过你可能就需要先删除文件夹中CLion相关的配置文件(如CMakeLists.txt)或者直接在网页端复制你需要的代码即可\n\n------\n\n\n\n## 参考书目 Bibliography\n\n|            教材            |      作者      |                             图示                             |                           资源链接                           |\n| :------------------------: | :------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |\n|       数据结构双色版       | 严蔚敏、李冬梅 | ![数据结构（C语言版）（第2版）](img/2110398aa6025c417e71.jpeg) | \u003ca href=\"https://www.ryjiaoyu.com/book/details/45170\"\u003e人邮教育\u003c/a\u003e |\n| 数据结构习题解析与实验指导 |     李冬梅     | ![数据结构习题解析与实验指导](img/2204c1aa113663e88ab9.png)  | \u003ca href=\"https://www.ryjiaoyu.com/book/details/43313\"\u003e人邮教育\u003c/a\u003e |\n\n------\n\n\n\n## 推荐资源 Recommended Resources\n\n- \u003ca href=\"https://www.educoder.net/paths/jizlwfkq\"\u003e头歌实训平台\u003c/a\u003e\n\n- \u003ca href=\"https://www.bilibili.com/video/BV1nJ411V7bd/?spm_id_from=333.337.search-card.all.click\"\u003e数据结构与算法基础--青岛大学王卓\u003c/a\u003e\n\n- \u003ca href=\"https://www.bilibili.com/video/BV1b7411N798?p=51\u0026spm_id_from=pageDriver\u0026vd_source=61a8f743f4489a59a143809ed7fb1159\"\u003e数据结构--王道计算机考研\u003c/a\u003e\n\n------\n\n\n\n## 声明 Disclaimer\n\n- 该项目**仅用于学习交流**，凡是可能涉及到的版权问题，归**教材原作者所有**\n\n- 本人所贡献的部分，遵从`MIT`协议\n\n最后，如果你认为这个项目帮助到了你，不妨给个star✨!\n\n------\n\n\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=ascendho/KY-DS\u0026type=Date)](https://star-history.com/#ascendho/KY-DS\u0026Date)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascendho%2Fdata-structures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascendho%2Fdata-structures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascendho%2Fdata-structures/lists"}