Reputation: 131
I would like to know which sorting algorithm the linux SORT command uses?
Upvotes: 8
Views: 6554
Reputation: 146221
It1 uses mergesort rather than quicksort or heapsort for two reasons:
1. Linux distros are free to choose their own sort utility but I imagine virtually all use GNU sort so I have described that.
Upvotes: 11
Reputation: 1731
An External R-Way merge sort according to Algorithm details of UNIX Sort Command. Found via this stackoverflow question.
Upvotes: 7