"Does these sorts algorithms (in Standard Library) use some of advanced sorts approaches, like bubble sort ... in their internal implementations."pic.twitter.com/G2aVVlqKBA
Only time an edge would move more than one position in the list is if it has a *very* steep slope, *and* is self-intersecting. Extremely rare in practice.
-
-
If I'm understand the typical inputs correctly, I'd expect insertion sort to do the same number of comparisons and swaps as bubble sort (or fewer). I only see a comparison to n log n in the comment, which is a pretty bizarre number to compare the number of iterations to.
-
Usually insertion sort writes every element of the array once, though, right?
- 5 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.