Introduction to algorithms - Cormen, Thomas H. (The MIT Press, 2001)