← All problemsSign in

SORTED

This problem doesn’t have any fancy story. Given and array a for all indexes form 1 to N (where N is the total number of elements of the array) . Find the minimal L (1L to R when sorted will have continuous elements. Note: Here by continuous elements we meant that in the subarray all the numbers must be present. i.e. for any subarry from L to R [3,4,5] is valid but [3,4,6] is not valid. All ele

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