Main Purposes of the series of blog posts:
CollectAlgorithmAnd thought, and included some of their own thinking and related questions extended for review and inquiry.
Abstract:
Mainly algorithm collection, combined 《ProgramPractise of programming and programming essence: Writing high-quality C LanguageCodeWriting solid code and introduction to algorithms, as well as your own thoughts, whether you have read the original book or not, can help you quickly understand and complete these algorithms independently. I believe that my own explanations are more detailed and easier to understand than the original book. Based on my experience, I have extended many questions, which is also the reason why this series is named "Pearl River. Of course, it is not advisable to "buy a bag and return a ball". Although this series contains a vast majority of valuable content, some interesting content related to topics but not relevant to algorithms is limited to my time, I had to discard it. It is recommended that readers of Time-rich should read the original book as much as possible and use this series of blog posts as references.
Algorithm questions and exercises from the original books of "programming Pearl" and "continued" are marked.
This series of blog posts has been written. Expected: 1 ~ An article was published in 3 days. It has been released at present (2013.7.8.
Index link:
Definition and Application of bitvector/bitmap
Application of estimation and little law
Random Number function sampling and Probability
Code correctness: Non-variant loop, assertions, and debug
Dual thinking, divide and control, and sort thinking
String and array algorithms: Left shift, hash table, suffix array solution for longest repeated subsequences, maximum continuous subsequences
Introduction to the content not included in the original book:
1. Basic Data Structure
Binary Search Tree
2. Less-used data structures
Box
3. Basic sorting
Insert sorting, Hill sorting, and quick sorting
4. Heap and priority queue
I personally prefer to use the version introduced in introduction to algorithms.
5. Markov Chain text Generator
Using Markov chains and text training, you can generate a natural random text program.
Compared with program design practices, the use of more sophisticated data structures consumes less space, but it is more difficult to understand.
6. code optimization using binary search (Chapter 1) and prime search (chapter 2 of "continued") as an Example
7. Bit Sorting Algorithm
Similar to strcmp (), see exercise 11.5
8. topological sorting
Chapter 2, pseudocode:
Initialize a queue to empty
For each node I
If pre count of I is 0
Insert I to queue
While queue is not empty
Delete t from the front of queue
Print t
For each successor s of T
Decrement Pred count of S
If the count is 0
Insert s to queue
The topological sorting in "computing Guide" is slightly more difficult to understand than this, because it introduces the concept of End Time for illustration.
9. Join an array
This section describes the features of the awk language. The map container in C ++ currently has functions similar to the dictionary in Python.
10. Numerical Analysis represented by Newton Iteration Method (chapter 2 of "continued)