SMS: Introduction to algorithms