Sorting strings by comparisons (e.g. standard QuickSort + strcmp-like function) may be a bit slow, especially for long strings sharing a common prefix (the comparison function t
If you know that the string consist only of certain characters (which is almost always the case), you can use a variant of BucketSort or RadixSort.