## CLRS(Introduction to Algorithms 2nd) reading notes 1

2013年01月25日 ⁄ 综合 ⁄ 共 1490字 ⁄ 字号 评论关闭

CLRS, a.k.a Introduction to Algorithm, is probably the most important book for each software developer to read. I didn't pay enough attention on this book in the past several years so I decided to read through it this year.

I have finished the first 3 parts, about 14 chapters, which are all about the rudiments for algorithm - yes, a more charming journey is waiting for me...

After a general introduction to 'what is algorithm?', the necessary maths. tools are elaborated that are mostly around algebra and some statistics. These stuff are a little bit tough but they are the basic tools for analyzing the complexity of each algorithm in the following chapters.

The second part is on sorting. You'll learn: comparing based algorithms are all O(nlgn) while non-comparing based algorithms (like counting based, bucket-sorting) are O(n).

The third part is on basic Data Structures. Two things may attract you. Hash table contains a profound maths support, which may cost you more brain cells; the most classic stuff is R-B Tree. When you read it first, you may find it some difficult. After several days' thinking, you will enjoy the beauty of R-B Tree - its self-balancing mechanism is amazing. But I don't think the statement of the R-B Tree chapter is good. It is some wordy and even verbose. The authors introduce a double-layer color concept, which I think makes the knowledge even harder. Then I go to Wikipedia for a better article, but it disappointed me again - the elaboration on Wikipedia introduces more cases while CLRS keeps a relative simpler analysis model. I found one popular Chinese article on R-B Tree
finally and it helps a lot.

All right, I'm ready for the latter parts of the book. They are relatively more advanced knowledge and skills. I think they will be more fun.