brief introduction to algorithms 628447