Class SortHelper

Constructors

Methods

  • Sorts an array with mutation via depth limited quick sort algorithm.

    Parameters

    • keys: any[]

      The array to be sorted.

    • Optional comparerFn: ((a, b) => number)

      The sorting function.

        • (a, b): number
        • Parameters

          • a: any
          • b: any

          Returns number

    Returns any[]

    The same array.

  • Sorts an array with mutation via introspective sort algorithm.

    Parameters

    • keys: any[]

      The array to be sorted.

    • Optional comparerFn: ((a, b) => number)

      The sorting function.

        • (a, b): number
        • Parameters

          • a: any
          • b: any

          Returns number

    Returns any[]

    The same array.