Daily algorithm exercise