• Converts an array into a bag data-structure (in the form of a map mapping the entries/keys to their counts)

    Type Parameters

    • T

    Parameters

    • arr: T[]

    Returns Map<T, number>