Solutions to CodingBat problems