Practice python code in "Introduction to Algorithms".