3 ms·
Right. Isn't the intuition that the comparison and swap rule is applied to every possible combination? Put another way: How can you rearrange everything based o
by cwoolfe 5y ago
Right. Isn't the intuition that the comparison and swap rule is applied to every possible combination? Put another way: How can you rearrange everything based on order and expect the net result to not be ordered at the end?
- kilovoltaire 5y agoNote that the comparison is backwards, so by that line of thinking it would sort in reverse (descending) order …but it doesn't