Solutions to Algorithm Problem Set 1