3 ms·
The main "issue" I have is that if you write a "bubble" sort backwards, then its suddenly insertion sort instead and much more efficient. For people who know a
by dragontamer 7y ago
The main "issue" I have is that if you write a "bubble" sort backwards, then its suddenly insertion sort instead and much more efficient.
For people who know about knots out there... its like asking for somebody to tie a Granny Knot instead of a square-knot. Anyone who actually practiced knot-tying will "accidentally" tie a square-knot instead (because the square-knot is stronger for the same level of effort).
Similarly, bubble sort is the "bad" way to write insertion sort. Anybody who actually practiced writing sorts will write insertion sort by accident instead.
- seba_dos1 7y agoI'm pretty sure the original meaning of "I can't even write bubble sort on a whiteboard" wasn't "I would accidentally write a more efficient algorithm instead" ;)