You are viewing a single comment's thread. Return to all comments →
I thought I could solve this problem by quicksorting the array and then counting the number of swaps.
No other person did it this way and I was unable to get it to pass for more than the first test case. I guess I misunderstood the problem somehow.
Why wouldn't my approach work?