# stirlingSecondKind

> **stirlingSecondKind**(`n`, `k`): `bigint`

Defined in: [packages/combinatorics/src/stirling-second-kind.ts:16](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/combinatorics/src/stirling-second-kind.ts#L16)

Count partitions of n items into k non-empty blocks as a bigint. Returns 0n for k > n.

O(nk) arithmetic operations and O(k) bigint storage when k <= n.

## Parameters

### n

`number`

### k

`number`

## Returns

`bigint`

## Throws

With `INVALID_COUNT` for an invalid count or `COUNT_TOO_LARGE` if n exceeds `COMBINATORICS_MAX_COUNT`.
