Sweets for Children in a Row
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- hard
- Pro
Children stand in a row, each with a rating. Every child must get at least one sweet, and a child with a higher rating than a neighbour must get more sweets than that neighbour. Find the fewest sweets needed.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.