4 ms·
Oh yes, good point: I got carried away; there is a difference! Simplicity is subjective (I think mine is simpler of course :P), but the algorithm in the post is
by svat 5y ago
Oh yes, good point: I got carried away; there is a difference! Simplicity is subjective (I think mine is simpler of course :P), but the algorithm in the post is indeed more surprising.
- pricecomstock 5y agoYour algorithm does appear in Section 3.1 of the linked paper by the name "Exchange Sort"