func (h *BHeap) IsEmpty() bool {
	return h.next == 1
}
IsEmpty returns true if heap is empty
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
}