What sorting algorithm(s) is/are used in the unix sort command? Insertion/quicksort/etc.?

link|improve this question

feedback

2 Answers

up vote 7 down vote accepted

If you are referring to GNU sort, it implements a variant of the merge sort algorithm.

The coreutils are open source, so feel free to download them and take a look.

link|improve this answer
feedback

The relevant POSIX standard doesn't dictate what algorithm to use, so implementations are free to choose what they like.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.