the exercise of introduction to algorithms