Chocolate distribution problem
Filed under PhonePe · Also reported at Devtron.AI, Thorogood
The question
Given an array of positive integers representing ratings of N children, find the minimum number of candies required so that every child gets at least one candy and children with higher ratings get more candies than their neighbors.
No write-up yet. Related questions below have one.
Related PhonePe questions
Collected from public candidate posts and coding forums. Updated Nov 2026.