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