Programming examples from "Introduction to Algorithms"