module
sort
Implements sorting functions.
You can import these APIs from the algorithm
package. For example:
from algorithm.sort import sort
Functions
-
partition
: Partition the input vector inplace such that first k elements are the largest (or smallest if cmp_fn is <= operator) elements. The ordering of the first k elements is undefined. -
sort
: Sort the vector inplace.