← All problemsSign in

Arranging bangles

Seema has a lot of bangles all stored in a box. Bangles are of different size, colors and make. She has a habit of buying bangles as pairs. She wants to pile them by sizes in such a way that the maximum sized the bangles are in the middle and the following sizes will have the placed beside each bangle. For eg four bangles with sizes 7 (one pair), 8 (one pair) will be placed as 7, 8, 8, 7. If there

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