Introduction to Algorithms
Thomas H. Cormen & Charles E. Leiserson & Ronald L. Rivest & Clifford Stein