算法导论CLRS-notes-0

来源:互联网 发布:日本神户钢铁造假知乎 编辑:程序博客网 时间:2024/05/16 21:47

算法经典- 算法导论(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.