Introduction to algorithms - Thomas H Cormen [et al] (Prentice-Hall of India, New Delhi, 2004)