reverse sort
CodeChefOpen on judge ↗
Vedha does not like to sort an $array$ in normal ways. Now she has chosen a way to sort by reversing some of the subarrays of the given array. She added a rule i.e, to only reverse the subarrays which have its sum of elements at most $Y$. Later her friend notices that it is not always possible to do so by the rules done by Vedha. Help Vedha to find whether a given $Array$ can be sorted by the a
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.
Sign in to chat with the tutor and save your progress.
Sign in to start