3 ms·
It's not a merge sort, it's just a partition. Mark every element greater than your pivot as "move right". Then step 4 marks every smaller element as "move left"
by jfengel 1y ago
It's not a merge sort, it's just a partition. Mark every element greater than your pivot as "move right". Then step 4 marks every smaller element as "move left". Step 5 actually does that.
You don't really need to split that into 3 steps, though it looks a bit more like a real IKEA diagram with the extra steps.
- NetMageSCW 1y agoWrong diagram - “merge sort”.