Introduction to Computer Algorithms