Introduction To Algorithms - Cormen, Thomas H.; LEISERSON, CHARLES E.; RIVEST RONALD L. (NEW DELHI, 2004)