func (h *BHeap) Top() (value interface{}, ok bool) {
	if h.IsEmpty() {
		return nil, false
	}
	return h.get(1), true
}
Top returns top element of the heap
package heap
type BHeap struct {
	data   []interface{}
	comp   func(interface{}, interface{}) bool
	size   int
	mask   int
	shift  int
	rows   int
	length int
	next   int
}
const rowShift int = 16
const rowWidth int = 1 << uint(rowShift)
func NewBHeapSized(size int, comp func(interface{}, interface{}) bool) *BHeap {
	u := 1
	for ; (1 << uint(u)) != size; u++ {
	}
	r := 16
	h := &BHeap{
		data:   make([]interface{}, r),
		comp:   comp,
		size:   size,
		mask:   size - 1,
		shift:  u,
		rows:   r,
		length: 0,
		next:   1,
	}
	h.addRow()
	h.set(1, nil)
	return h
}
func (h *BHeap) Size() int {
	return h.next - 1
}
func (h *BHeap) IsEmpty() bool {
	return h.next == 1
}
func (h *BHeap) Push(value interface{}) {
	if h.length == h.next {
		h.addRow()
	}
	u := h.next
	h.next++
	h.set(u, value)
	h.up(u)
}
func (h *BHeap) Pop() (value interface{}, ok bool) {
	if h.IsEmpty() {
		return nil, false
	}
	value = h.get(1)
	h.swap(1, h.next-1)
	h.next--
	h.down(1)
	return value, true
}