← All problemsSign in

Class Monitor

Impressed by your performance in the class, your class teacher made you the class monitor. Your class has $N$ students (**excluding you**) and the $i^{th}$ student has height $h_i$. Every morning, the students of each class are required to assemble in the school ground for the morning prayers. Before moving to the ground, students of each class are arranged in lines and each line should be _beauti

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