@mojir/lits
Version:
Lits is a pure functional programming language implemented in TypeScript
10 lines (9 loc) • 490 B
TypeScript
/**
* Counts occurrences of each integer value in an array of non-negative integers.
*
* @param array - Array of non-negative integers to count
* @param minLength - Minimum length of the output array (default: 0)
* @param weights - Optional array of weights (same length as input array)
* @returns An array where index i contains the count of occurrences of i in the input array
*/
export declare function bincount(array: number[], minLength?: number, weights?: number[]): number[];