www.cnblogs.com/kangjianwei…
“Data structure -C language version” (Yan Weimin, Wu Weimin edition) textbook source code + problem set analysis instructions
First attach the document category:
New Year Data Structure New Year Data Structure New Year Data Structure
The New Year Is the New Year. The New Year is the New Year. The New Year is the New Year
Download relevant directories and test data
New Year’s Data Structure: New Year’s Data Structure: New Year’s Data Structure: New Year’s Data Structure
Bloggers have this to say:
01. Self-study programming, it is hard to avoid blocking, so I have updated in this blog Yan Weimin, Wu Weimin version of “data structure -C language version” each chapter of the textbook source code and supporting problem set answer analysis, the purpose is to sort out the data structure in the knowledge point, and exchange views with netizens, pool wisdom, common progress. (It has been updated, details need to be improved)
★ Note ★ Left essay classification with two columns: < textbook source >, < exercise analysis > to store this topic document.
< textbook source > directory to achieve three kinds of data structure source:
1. Data structures and algorithms described in textbooks;
2. Data structures mentioned in the textbook but not described in detail;
Data structures not mentioned in the textbook, but covered in the problem set.
The < problem analysis > directory contains the solutions for each chapter of the problem set, but for the algorithm design questions, pay attention to the relative path, because references from other documents are involved.
Please refer to appendix II for the organization of each document. Contact the blogger if you have any questions.
02. This source code and analysis covers the “data structure” textbook and problem sets two parts, textbook and problem sets respectively as the following figure books for reference (I have the paper version on the left and the electronic version on the right, it seems that the content is no different) :
03. All source code implementation are using C Language, follow the C99 standard, using C-free 5 (for compatibility reasons, WIN10 is more recommended CLion) (built-in GCC compiler, compile, need to in the menu bar, location to build –> Build options –> category –>C Language, check the third: “ISO C99 plus GNU Extensions [-std=gnu99]”, i.e. use -std=gnu99 instead of -std=c89 or -std= C99) test passed (do not create a project, if running in a project, The way the files refer to each other may need rewriting. (Yes, learning C language, seriously recommend this compiler (Win7), simple, easy to use, powerful! Please refer to Article 6 for notes)
Attached download link:CFree5
04 in order to facilitate reference, access, the content of each chapter in the computer folder storage, which, “▲ textbook algorithm” stored in the realization of the algorithm in the textbook, “▼ matching exercises analysis” stored on the set of exercises to solve the problem, the source file according to the chapter, section organization, organization see appendix two.
Pay attention to the relative paths of the. H or. C files. To ensure valid references to each. H or. C document in the source code, keep the relative positions of each document fixed.
#include includes.c files instead of.h files for the main document, because the test GCC compiler supports direct compilation without creating the project. If you are testing under Microsoft compilers such as Visual Studio, you must first create the project and introduce.h files, and the definition of global variables and so on May need to be modified to the extren form. For the use of VC6 or Visual Studio, there are other compilers generated by various compilation problems, please baidu solve.
★★★07. Some type definition names, macro names, function names and algorithm steps are slightly different from the original book of “Data Structures”, but the algorithm idea is consistent with the original book, so “rewriting” is mainly for easy to distinguish the names and simplify the operation. The test data of some files is set as a separate document rather than input from the console, for the convenience of testing and avoiding repeated data entry.
★★08. If you are using a compiler other than CFree, please pay attention to the file encoding format (of course, if you are coding from scratch, ignore this one!).
09. The algorithms are not 100% perfect, all accidents are not considered, and too much input and output verification is not done.
10. Some data structures need to be initialized before creation, and some data structures need to be created and initialized all together.
11. Most group 0 units are deprecated or used as counters.
12. Look at global variable and type definitions, macro definitions.
13. Some seemingly “redundant” indenting in the algorithm test document is to distinguish different functional modules for easy browsing.
★★★14. In the problem set analysis, different people may have different understanding of the same question, so this is only my personal opinion, not the opinion of anyone else.
15. The source of all involved are in the picture is given, the purpose is to prevent the classmate copy homework, second is wants to beginners can knock again, the code, rather than copy and paste the past not see (in fact, no write again, even if according to write it again, never know what you will make wrong). For test data files, download links are provided.
★★★16. If you have any questions about the code, or find any errors, or have good suggestions or ideas, you can contact the blogger.
17. The scanf. c file in the introduction contains a Scanf function to read Western characters from the file. This function is designed to reduce the testing effort and avoid manually entering data on the console at every test… …
18. About IDE, previously said, learning C language, from my personal aesthetic point of view, in Win7, novice only recommend CFree, with mingw this compilation tool set, simple, powerful and good-looking. CLion and CFree use of the compiler environment, the difference is that this software is more “intelligent”, the appearance level is also very high, the operation experience is also good, and the development of C++ also no pressure, but the computer configuration may be a little bit higher requirements. If you prefer Microsoft, you can also use their VS, in addition to the large size and complex operation, is also a very powerful IDE, development of large projects necessary, but beginners calculate it, not recommended…
19 about C/C++ compiler, roughly divided into Microsoft and GNU bar, Microsoft’s general integration in their own IDE, GNU has GCC (C language) and g++ (C++), here in the CFree mingw is a collection of GCC and g++, if you want to use the latest version, you can go to download configuration.
20. If you haven’t studied a programming language seriously, don’t try this course, or even if you want to, don’t start with this book. This book should assume that you are already familiar with a language, not just C, but C++, Java, Python, etc. Of course, it’s good to know C/C++, because the sample code in this book is a C/C++ hybrid (mostly C).
21. To be continued…
Attached one: “data structure” textbook source code “▲ textbook algorithm implementation” directory file organization, “▼ supporting exercises analysis” part of the organization is similar, but each chapter internal storage is exercises analysis and test documents.
Appendix 2: Source directory organization (pay attention to keep the relative position of each file fixed) :
New Year’s Data Structure: New Year’s Data Structure: New Year’s Data Structure: New Year’s Data Structure