Skip to content

Async Sort

zak-zaffar edited this page Jan 3, 2020 · 2 revisions

Async Sort

Try iterable-async on RunKit

The asyncSort() method sorts the elements of an array in place and returns the sorted array. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.

asyncSort implements quicksort and so has space complexity O(log n).

Clone this wiki locally