4 ms·
Not a CS guy: These animations are always nice, but which of all the sorting algos are actually used in practice?
by shellfishgene 4y ago
Not a CS guy: These animations are always nice, but which of all the sorting algos are actually used in practice?
- nkozyra 4y agoSurprisingly, it's pretty varied, but Timsort and quicksort are pretty common in language implementations. I don't know that people are reimplementing these in practice all that often rather than using std library but writing and comparing them was part of my earliest CS education at least.
- bvinc 4y agoPeople just use whatever their programming language provides. There's a concept of sorting "stability" in which equal elements stay in their original order relative to each other. If stability is important, then usually some variant of merge sort is used. If it's not, then some variant of quick sort is used. If the list, or sublist you're working with is small enough, insertion sort is used.