Solutions to algorithm problems.