Skip to content

fanyang01/bheap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
			}
		}
	}

About

Binomial Heap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages