Original: http://www.cnblogs.com/kangjianwei101/p/5221816.html
Data structure-C language edition (Min, 聯繫 version) textbook source + problem sets analysis using instructions
Enclose the document collation directory first:
Textbook Source Compilation Link ??? "Data structure" textbook source code compilation
Problem sets full parse link??? analysis of the problem of the data structure problems in the compilation
★ Related catalogue and test data download ★
Link??? Min "Data structure" textbook source code and exercise Analysis
Bloggers have words:
01. Self-study programming, inevitably thinking blocked, so I in this blog updated in succession Min, 聯繫 version of the data structure-C language version of the chapters of the textbook source code and supporting the answer analysis, the purpose is to collate the data structure of the knowledge points, and exchange views with netizens, brainstorming, and common progress. (currently updated, details to be completed)
★ NOTE ★ left essay classification with two columns :< textbook source code >,< problem solving > to store this topic document.
< textbook source code > Directory Implementation of three kinds of data structure source code:
One: the data structure and algorithm which is emphasized in the textbook;
II: textbooks mentioned, but no detailed description of the data structure ;
Three: the textbook does not mention, but the data structure involved in the problem sets.
< exercise Analysis > The catalog contains the solution for each chapter in the matching problem set, but for algorithmic design questions, note the relative path , because references to other documents are involved.
The organization of each document is shown in appendix II, with questions about contacting the blogger.
02. Source Code and analysis covers the "data structure" textbook and problem sets two parts, textbooks and problem sets are books for reference (I have the left side of the paper and the electronic version of the right, seemingly no difference between the content):
03. All source implementations use the C language, follow the C99 standard, use C-free 5 (for compatibility reasons, WIN10 more recommended clion) (built-in GCC compiler, need to be in the menu bar, on the build, build options----and category-->c Language, tick the third: "ISO C99 plus GNU extensions [-std=gnu99]", which means that the compile option is passed with-std=gnu99 instead of-std=c89 or-std=c99 (do not create the project, If it is running in the project, the way the files are referenced to each other may need to be rewritten). (Yes, learn C language, solemnly recommend this compiler (Win7), concise, easy to use, powerful!) Note (see article 6th)
Attached DOWNLOAD Link: CFree5
04. In order to facilitate the reference, access, chapter content in the computer sub-folder storage, wherein, "▲ Textbook algorithm implementation" stored in the text of the algorithm in the implementation of the textbook, "matching exercises analysis" stored in the solution to the focus of the problem, the source files according to chapters, the organization of the way see appendix Two.
★★★05. Note the relative path of each document when referencing. h files or. c files. To ensure that references to the. h or. C documents are valid in the source code, keep the relative positions of each document fixed.
★06. For the main document (the document with the main function), #include自定义源码时引入的是 the. c file instead of the. h file, because the test uses a GCC compiler that supports direct compilation without creating a project. If you are testing under Microsoft's compilers such as Visual Studio, you must first create the project and introduce the. h file, and the definition of the global variable may need to be modified to become a extren form. For the use of VC6 or Visual Studio, there are other compiler generated by the various compilation problems, please Baidu to solve.
★07. Partial type definition names, macro names, function names, and algorithmic steps are slightly different from the original book of data structure, but the idea of the algorithm is consistent with the original book, so that "rewriting" is primarily to make it easier to differentiate names and simplify operations. The test data of some files is set to a separate document without input from the console, so it is convenient to test and avoid repeating data entry.
★08. If you are using a compiler that is not cfree, be aware of the file encoding format (and, of course, ignore this if you are tapping the code yourself!). )
09. Each algorithm is not 100% perfect, did not consider all accidents, did not do too much input and output verification.
10. Some data structures need to be initialized before they are created, and some are created and initially combined.
11. Most group No. 0 units are deprecated or used as counters.
12. Be aware of global variables and type definitions, and macro definitions.
13. Some of the seemingly "superfluous" indents in the algorithm's test document are designed to differentiate between different functional modules for easy browsing.
★14. In the problem sets analysis, different people may understand the same topic differently, so this is just to express my personal thoughts, not on behalf of anyone else's views.
15. All involved in the source code are given by the picture, the purpose is to prevent students to copy homework, the purpose of the second is to hope that the beginner can own the code to knock over, rather than copy and paste the past light to see not practice (it turns out, do not write it again, even if you write again, you will never know what is wrong) For test data files, a download link is given.
★16. If you have questions about the code, or if you find errors, or if you have good suggestions, ideas, you can contact the blogger.
17. The SCANF.C file in the introduction contains a scanf function to read Western characters from a file. The reason for designing this function is to reduce the testing effort and avoid manually entering data in the console every time you test ...
18. On the IDE, as mentioned earlier, learning C language, from my personal aesthetic perspective, on the Win7, novice only recommended Cfree, with MinGW This compilation toolset, concise and powerful and good-looking. In addition, it is recommended that clion (also useful on win10) Clion and cfree use of the same compilation environment, the difference is that the software more "smart", Yan value is also very high, the operation experience is also good, and the development of C + + is no pressure, but the computer configuration may require a little bit higher. If you prefer Microsoft, you can also go to use their home vs, in addition to bulky operation complex, but also a very powerful IDE, the development of large-scale project must, but beginners will forget it, not very recommended ...
19. The compiler for C + +, roughly divided into Microsoft and GNU bar, Microsoft's general integration in its own IDE, GNU has GCC (C language) and g++ (c + +), and so on, where the MinGW used in Cfree is a collection of GCC and g++, if you want to use the latest version, You can download the configuration yourself.
If youdo not learn a programming language carefully, please do not try this course, or, even if you want to learn, do not start with this book. This book should be positioned to assume that you are already familiar with a language, not limited to C, or C + +, Java, Python, and so on. Of course, it is best to understand C/D + +, because the sample code for this book is C /C + + (most of it is).
21. To be Continued ...
Attached: "Data structure" textbook source code "▲ Textbook Algorithm Implementation" directory of the file organization, "matching exercises analysis" part of the organization of the same way, but each chapter is stored in the analysis of the exercise and test documents.
Attached two: Source directory organization (note to keep each file relative position fixed):
Data structure-C language edition (Min, 聯繫 version) textbook source + problem sets analysis using instructions