# denseIntegerMinPriorityQueue

> **denseIntegerMinPriorityQueue**(`capacity`, `keyOrder`, `entries?`): [`DenseIntegerPriorityQueue`](/reference/knotkit/heap/interfaces/denseintegerpriorityqueue/)

Defined in: [packages/heap/src/dense-integer-priority-queue.ts:63](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/heap/src/dense-integer-priority-queue.ts#L63)

Allocate a binary min queue for integer values in `[0, capacity)`. Keys and positions are indexed by value. Floyd heapify preserves O(n) initial construction after allocating O(capacity) storage.

## Parameters

### capacity

`number`

### keyOrder

[`Order`](/reference/knotkit/heap/type-aliases/order/)<`number`>

### entries?

`Iterable`\<readonly \[`number`, `number`], `any`, `any`>

## Returns

[`DenseIntegerPriorityQueue`](/reference/knotkit/heap/interfaces/denseintegerpriorityqueue/)

## Throws

With `INVALID_CAPACITY` for a capacity outside the nonnegative signed 32-bit range, `INVALID_VALUE` for an initial value outside the domain, or `DUPLICATE_VALUE` for a repeated initial value.
