← All problemsSign in

Birthday party

Lucky invites his friends on his birthday party. Only N friends, numbered from 1 to N came to his house. They all sit around a circular table around which N chairs are placed. They sit in a such a manner that ith friend will sit in between (i-1)th and (i+1)thth friend. Nth friend will sit adjacent to 1st friend. After dinner all the adjacent friends of Lucky became friends with each other except 1

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