A few more Algorithms exercise solution.