Solutions to exercises from the Introduction to Algorithms, 3rd ed book