算法经典- 算法导论(Introduction to Algorithms)
作者 Thomes Cormen, Charles Leiserson, Ronald Rivest, Clifford Stein. 去四位作者名称首字母,简写为 CLRS。
The book starts with an algorithm analysis of sorting algorithms.
In chapter 3 they provide definition of time/space complexity of algorithms.
Chapter 4. Divide and Conquer.
Using the idea of divide and conquer they introduces the classic sorting algorithms: heap sort and quick sort.
Heap sort: based on a basic data structure: complete binary tree.
Key: heap-maxify. using it recursively.
Quick sort: worst case: O(n^2). But it works very well practically.
Key: the choice of petition value.