You are viewing a single comment's thread. Return to all comments →
The spec also says that the first line of input is n, and that arr[i] <= n. But in that example, arr[6] == n + 1!
So that test case is clearly wrong, the correct test case should be:
7 1 3 5 2 4 6 7
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 spec also says that the first line of input is n, and that arr[i] <= n. But in that example, arr[6] == n + 1!
So that test case is clearly wrong, the correct test case should be: