Two classes of students each stand in two rows for a photo. Every student in the back row must be strictly taller than the one directly in front.
Given heights of both classes, determine if a valid arrangement exists. Example: class1 = [, , , , ], class2 = [, , , , ]. Can you arrange them?
The constraint is strict inequality, so equal heights in the same column break the rule. Your strategy: sort both classes and check if every back-row student is taller than the corresponding front-row student.