void sort(); void sort( BinPred compfunction );
The sort() function is used to sort lists. Ordering is done via the < operator, unless compfunction is specified, in which case it is used to determine if an element is less than another.
Sorting takes n * log(n) time.