mingo
    Preparing search index...

    Function findInsertIndex

    • Find the insert index for the given key in a sorted array.

      Type Parameters

      • T = unknown

      Parameters

      • sorted: T[]

        The sorted array to search

      • item: T

        The search key

      • comparator: Comparator<T> = compare

        Optional custom compare function

      Returns number