Introduction to Algorithms, 4th edition