You are viewing a single comment's thread. Return to all comments →
The second constraint is 1 < arr[i] < n.
In order for a consecutive array of length n to start at a value greater than one, a value would have to exceed n.
Basically the constraints and test cases are not aligned.
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Swaps 2
You are viewing a single comment's thread. Return to all comments →
The second constraint is 1 < arr[i] < n.
In order for a consecutive array of length n to start at a value greater than one, a value would have to exceed n.
Basically the constraints and test cases are not aligned.