Skip to main content
Log in

Mojo module

sort

Implements the built-in sort function.

These are Mojo built-ins, so you don't need to import them.

Aliases

  • insertion_sort_threshold = 32:

Functions

  • partition: Partition the input buffer 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 list inplace. The function doesn't return anything, the list is updated inplace.