vis-util
    Preparing search index...

    Function insertSort

    • This method provides a stable sort implementation, very fast for presorted data.

      Type Parameters

      • T

      Parameters

      • a: T[]

        The array to be sorted (in-place).

      • compare: (a: T, b: T) => number

        An order comparator.

      Returns T[]

      The argument a.