Solutions to CodingBat.com problems