🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

github.com/fanyang01/bheap

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/fanyang01/bheap

v0.0.0-20151012135134-6e93e3cc14c4
Source
Go
Version published
Created
Source

Binomial Heap GoDoc Circle CI Build Status

Package bheap provides binomial-heap written in Go. Unlike the heap package provided by standard library, you don't need to implement any interface.

Example usage:

	import "github.com/fanyang01/bheap"

	func compare(x, y interface{}) bool {
		return bheap.CompareInt(y, x)
	}

	func test() {
		h := bheap.New(compare)
		for i := 0; i < 1<<20; i++ {
			h.Push(i)
		}
		for i := 0; i < 1<<20; i++ {
			if h.Pop().(int) != i {
				// error
			}
		}
	}

FAQs

Package last updated on 12 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts