โ† Yatra.com questions

Birthday problem (Candy distribution)

Filed under Yatra.com

The question

Given an array of friends' ages, distribute chocolates such that a friend with a higher age than their neighbor gets more chocolates than that neighbor.

No write-up yet. Related questions below have one.

Related Yatra.com questions

Collected from public candidate posts and coding forums. Updated Nov 2026.