# Why two adjacent children with equal rating don't get equal candies?

• The expect Output of [1,2,2] is 4, not 5. I think it's not reasonable.

• Following... I have the same question in my mind...

• In that test case, the number of candies to be given would be: 1-2-1 (total 4)

The rules say that each child must get a bigger amount of candy if he/she has a higher rating than the neighboring kids. The 3rd kid doesn't have any kid beside him/her with a lower rating, so optimally you can just give that kid a single candy and it would still be compliant to the rules.

• I really think this describe is sick as the children with the same weight should have the same amount of candies in common.

• I have the same question.
I think it is unfair that a child gets less candies than his neighbor with equal rating.

• hahaha, don't worry about it, we won't tell that pool child. lol

• I absolutely agree with you.
The description need clarification.

• It's really pointless to design the problem like that.

• @franz.sarmiento I understand the problem's description and solution, but it looks really really unreasonable(fair) to me!

• I'm wondering if they are trying to show off their tricks to come up with this problem.

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.