
Offers a heap implementation supporting min/max heaps, custom item types, and configurable parameters like capacity and scaling, ensuring efficient data organization and retrieval.
= K-Heap :source-highlighter: highlightjs :gh-group: k-libs :gh-name: k-heap :lib-package: io.klibs.collections :lib-group: io.k-libs :lib-name: heap :lib-version: 0.1.0 :lib-feature: 0.1.0
image:https://img.shields.io/github/license/{gh-group}/{gh-name}[title="License"] image:https://img.shields.io/badge/docs-dokka-ff69b4[link="https://{gh-group}.github.io/{gh-name}/dokka/{lib-feature}/{lib-name}/{lib-package}/index.html"] image:https://img.shields.io/maven-central/v/{lib-group}/{lib-name}[link="https://search.maven.org/artifact/{lib-group}/{lib-name}"]
A pure Kotlin heap implementation that allows for custom type items.
== Import
== Usage
=== Basic
val heap = minHeapOf(1, 5, 2, 4, 3)
val heap = maxHeapOf(1, 5, 2, 4, 3)
=== Custom Types
data class Dog(val name: String)
val dogs = listOf( Dog("Dexter"), Dog("Luna"), Dog("Daisy"), Dog("Max"), )
=== Full Control
= K-Heap :source-highlighter: highlightjs :gh-group: k-libs :gh-name: k-heap :lib-package: io.klibs.collections :lib-group: io.k-libs :lib-name: heap :lib-version: 0.1.0 :lib-feature: 0.1.0
image:https://img.shields.io/github/license/{gh-group}/{gh-name}[title="License"] image:https://img.shields.io/badge/docs-dokka-ff69b4[link="https://{gh-group}.github.io/{gh-name}/dokka/{lib-feature}/{lib-name}/{lib-package}/index.html"] image:https://img.shields.io/maven-central/v/{lib-group}/{lib-name}[link="https://search.maven.org/artifact/{lib-group}/{lib-name}"]
A pure Kotlin heap implementation that allows for custom type items.
== Import
== Usage
=== Basic
val heap = minHeapOf(1, 5, 2, 4, 3)
val heap = maxHeapOf(1, 5, 2, 4, 3)
=== Custom Types
data class Dog(val name: String)
val dogs = listOf( Dog("Dexter"), Dog("Luna"), Dog("Daisy"), Dog("Max"), )
=== Full Control