Skip to main content
Technical

Given an array of children’s ratings, assign at least one candy to each child so that higher-rated children get more than their neighbors, and return the minimum total candies needed.

Top community answer

No community answers yet.

Contribute an answer

Have a better answer?

Share your experience and earn credits toward your next interview session.

Contribute an answer