← All problemsSign in

The Sundar showdown

As Sundara Chozhan decides to step down from the throne, the members of the royal family are now in a state of confusion, as to who would be the next king. There are $N$ members who are planning to rebel and take over the throne. There are $N - 1$ meeting scheduled between these $N$ members, order of which can be changed arbitrarily. When two people meet, friends of first person become friends wit

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