The source code in this project is equipped with the textbook " Data Structure-C Language Edition " [Yan Weimin, Wu Weimin Edition] and " Data Structure Question Collection - C Language Edition " [Yan Weimin, Wu Weimin, Mining Edition].
| Data structure textbook | Data structure questions set |
|---|---|
![]() | ![]() |
This project includes the textbook source code and exercise source code , and is divided into 4 versions, namely: CFree , Dev-C++ , CLion , and VisualC++ , among which:
Choice of IDE
CFree is an excellent domestic software. Although it is small and complete, it is very suitable for novices. However, the product has been discontinued for a long time, and there are some compatibility issues on win10 and need to be adjusted.
Dev-C++ is an open source software that is as small and practical as CFree. The most important thing is that it is compatible with win10 and is recommended.
CLion requires a little knowledge of cmake and requires slightly higher performance requirements for notebooks. However, the JetBrains series products have excellent functions and are highly recommended to try them.
Microsoft Visual C++ is produced by Microsoft. The series is known as the strongest surface, but it is also very complex and is not friendly to novices and needs to be thought about patiently. If you do not take C/C++/C# and other routes in the future, you can not use them first. (Note: Since 2018, VC++6 has been replaced with Microsoft Visual C++ 2010 in the second level of computer C language exam. So if you have grading needs, please familiarize yourself with this IDE)
The analysis of non-code questions in the "Data Structure Question Collection" is stored in the exercise analysis . For problems that need to be solved by writing code, see the source code in the three versions of Dev-C++ , CLion , and VisualC++ .
注:
1. "CFree"是完整版本。"Dev-C++"/"CLion"/"VisualC++"是新增的版本,这三个版本最终会取代"CFree"版本。
2. "CFree"版本既可以用CFree直接打开,也支持用Dev-C++打开,所以当使用CFree遇到兼容问题时,可尝试用Dev-C++。
3. 上述四个版的代码是同步更新的,但是各版本之间相互独立,没有任何依赖关系,允许单独运行/测试。
4. 对所有版本的代码均未充分测试,尤其是很多代码没有完成的边界检查(原因是此处以实现算法正确性为目的,而较少考虑程序的健壮性),所以如有BUG请到Issues反馈。
The overall goal is to ensure correctness, improve readability, and reduce learning difficulty. Specifically, the following points are included:
After cloning/downloading the source code to the local area, you can view the README files in each branch to obtain help information

| Serial number | emoji | Meaning in this project | Abbreviation mark |
|---|---|---|---|
| (0) | ? | Initialize the project | :tada: |
| (1) | Update documentation, including but not limited to README | :memo: | |
| (2) | Release new source code | :bulb: | |
| (3) | ♻️ | Refactoring mainly refers to modifying existing source code and comments | :recycle: |
| (4) | ✏️ | Proofreading mainly refers to correcting typos, modifying source code layout, updating comments, etc. | :pencil2: |
| (5) | ? | Fix bugs in the code | :bug: |
Personal Blog
Source of emoji reference in Commit information:
| chapter | Festival | content | Includes algorithm | Remark |
|---|---|---|---|---|
| 01 Introduction | Status | Define some shared constants and functions | ||
| 02 Linear Table | SqList | Sequence table | 2.3, 2.4, 2.5, 2.6 | Sequential storage structure of linear tables |
| Union | A=A∪B | 2.1 | ||
| MergeSqList | C=A+B | 2.2, 2.7 | Merge order table | |
| LinkList | Link List | 2.8, 2.9, 2.10, 2.11 | Chain storage structure of linear tables | |
| MergeList | C=A+B | 2.12 | Merge link list | |
| SLinkList | Static linked list | 2.13, 2.14, 2.15, 2.16 | ||
| Difference | (AB)∪(BA) | 2.17 | ||
| DuLinkList | Bidirectional loop link list | 2.18, 2.19 | ||
| ELinkList | Extended linear link list | 2.20 | ||
| MergeEList | C=A+B | 2.21 | Combined and extended linear link list | |
| Polynomial | One-way polynomial | 2.22, 2.23 | ||
| 03 Stack and queue | SqStack | Stack | Sequential storage structure | |
| Conversion | Priority conversion | 3.1 | Stack application | |
| LineEdit | Line editing program | 3.2 | Stack application | |
| Maze | Maze way to find | 3.3 | Stack application | |
| Expression | Expression evaluation | 3.4 | Stack application | |
| Hanoi | Tower of Hannor | 3.5 | recursion | |
| LinkQueue | Chain column | Chain storage structure | ||
| SqQueue | Sequential Queue | Loop queue, sequential storage structure | ||
| BankQueuing | Simulate bank queue | 3.6, 3.7 | Queue application | |
| 04 String | SString | Sequence string | 4.1, 4.2, 4.3, 4.5 | Sequential storage |
| HString | Heap string | 4.4 | Sequential storage, dynamic allocation of memory | |
| LString | Blockchain string | Sequential storage + chain storage | ||
| KMP | KMP Algorithm | 4.6, 4.7, 4.8 | String matching algorithm | |
| WordList | Keyword index | 4.9, 4.10, 4.11, 4.12, 4.13, 4.14 | Application of heap strings and linear tables | |
| 05 Arrays and generalized tables | Array | Multidimensional array | ||
| TSMatrix | Sparse matrix | 5.1, 5.2 | How to store triple order tables | |
| RLSMatrix | Sparse matrix | 5.3 | How to store the order table of row logical links | |
| CrossList | Sparse matrix | 5.4 | Cross-link list storage method | |
| GList-HT | Generalized Table | 5.5, 5.6, 5.7, 5.8 | Head and tail link list storage representation | |
| GList-E | Generalized Table | Extended linear linked list storage representation | ||
| MPList | m-part polynomial | Chain storage | ||
| 06 Tree and Binary Tree | SqBiTree | Binary tree sequential storage structure | ||
| BiTree | Binary linked list storage structure of binary tree | 6.1, 6.2, 6.3, 6.4 | ||
| BiTriTree | The three-quarter linked list storage structure of binary tree | |||
| BiThrTree | Clue binary tree | 6.5, 6.6, 6.7 | ||
| PTree | The parent table storage representation of the tree | |||
| CTree | The storage representation of the tree's children's linked list (with parents) | |||
| CSTree | The tree's binary linked list (children-brother) structure storage representation | |||
| MFSet | gather | 6.8, 6.9, 6.10, 6.11 | ||
| HuffmanTree | Huffman Tree | 6.12, 6.13 | Also known as "Hafman Tree" | |
| PowerSet | Collection | 6.14/6.15 | ||
| NQueens | N Queen's Problem | 6.16 | ||
| 07 Picture | MGraph | The adjacency matrix storage of the graph | 7.1, 7.2, 7.4, 7.5, 7.6 | Directed graph, directed network, undirected graph, undirected network |
| ALGraph | The adjacent table storage of the graph | Directed graph, directed network, undirected graph, undirected network | ||
| OLGraph | The cross-link list storage of the diagram | 7.3 | Directed graph, directed network, undirected graph, undirected network | |
| AMLGraph | The adjacent multiple table storage of the graph | Undirected graph, undirected network | ||
| SpanningTree | Spanning tree of undirected graphs | 7.7, 7.8 | Mr. Deep Excellent to Become a Tree | |
| StronglyConnectedComponents | Directed graph strong connectivity components | Kosaraju Algorithm and Tarjan Algorithm | ||
| MinimumSpanningTree | Minimum spanning tree for undirected networks | 7.9 | Prim algorithm and Kruskal algorithm | |
| ArticlePoints | The nodes of the undirected graph | 7.10, 7.11 | ||
| TopologicalSorting | Topological sorting of AOV-network | 7.12 | Directed graph | |
| CriticalPathMethod | The key path to AOE-network | 7.13, 7.14 | Targeted Network | |
| ShortestPaths | Shortest path algorithm | 7.15, 7.16 | Dijkstra algorithm and Floyd algorithm | |
| 08 Dynamic storage management | BoundaryTagMethod | Boundary identification method | 8.1 | |
| BuddySystem | Partner System | 8.2 | ||
| GarbageCollection | Useless unit collection | 8.3 | Stackless traversal generalized table |