Hand out the minimum total number of candies to children in a line so that each child gets at least one and any child rated higher than an immediate neighbor gets more than that neighbor.
Loading content...