← All problemsSign in

Arrange Elements

This time chef is in big trouble .He has given some input data, from which he has to arrange some elements in order such that before the current element their lies a small element and after the current element their lies an greater element . The trouble doesn't ends here he has to ,check that the the number of inputs entered is even or odd(there are N inputs). In case of odd number of inputs chef

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