All CS193 homework converted to Swift