Search⌘ K
AI Features

Candy

Candy gives each child in a line a rating and requires at least one candy per child. Assign more candies to higher-rated neighbors while minimizing the total.

Statement

You are given an array, ratings, where ratings[i] represents the rating of the ...