Sorts the vector.
Sorts the vector in either ascending (default) or descending order. Implemented using the standard quicksort, qsort().