17 lines
250 B
Go
17 lines
250 B
Go
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}
|
|
}
|