← All problemsSign in

The Birthday Party

Problem Statement: Addy is organising games in a birthday party. There are N kids and each of them initially has a ball. Every second, each kid throws the ball from his hand to a specific kid. Also it is assured that every kid will receive a ball from some specific kid, every second. Addy is bored, so he wants to calculate the minimum number of seconds before which every kid will have the ball

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start