Introduction to Algorithms (CLRS) - Chapter 2