structure/heap/heap.go

17 lines
250 B
Go
Raw Normal View History

2019-04-11 13:34:50 +00:00
package heap
import (
"474420502.top/eson/structure/compare"
)
type Heap struct {
size int
cap int
elements []interface{}
Compare compare.Compare
}
func New(Compare compare.Compare) *Heap {
return &Heap{Compare: Compare, cap: 8}
}