3431. Minimum Unlocked Indices to Sort Nums
ArrayHash Table
Hints
Hint 1
All positions between the first 2 and the last 1 should be unlocked.
Hint 2
All positions between the first 3 and the last 2 should be unlocked.
Hint 3
If the position of the first 3 is less than the position of the last 1, the answer is -1.
Preparing judge…