← All problemsSign in

Dance Competition

Kedia is hosting a birthday party. As he is unsure on how to make couples for the dance event, he thinks of an idea. He lists down the names of all his friends in alphabetical order. And then, he starts pairing the first and last, second and second last friends and so on… (Note : Kedia is the judge of the dance event) Input You are given ‘n’, number of friends of Mehta. (1 Output Print the

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