Introduction to Algorithms, Second Edition Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein
This is a real good book to clearly understand all time complexities in detail. http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=8569
