Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/easyts/container/heap.ts

js library written with ts, use select and chan like golang in js.
Latest
import * as easyts from "https://deno.land/x/easyts@0.1.3/container/heap.ts";

Functions

Fix re-establishes the heap ordering after the element at index i has changed its value.

Initialize array to heap

Pop removes and returns the minimum element (according to cf or <) from the heap.

Push pushes the element x onto the heap.

Remove removes and returns the element at index i from the heap.