Skip to content

Heap data structure extracted from Google Closure JS library

Notifications You must be signed in to change notification settings

nornagon/closure-heap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

closure-heap

This is an implementation of a Heap datastructure. Smaller keys rise to the top.

This implementation is extracted from the Google Closure Library.

Usage

const Heap = require('closure-heap')

const h = new Heap
h.insert(3, 'sheep')
h.insert(1, 'goat')
h.insert(2, 'chicken')

console.log(h.remove())
// => goat

See the Closure docs (or take a look at the source) for additional documentation.

About

Heap data structure extracted from Google Closure JS library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages