finish array2

This commit is contained in:
2019-04-11 21:34:50 +08:00
parent 4f49401561
commit 5fba95bf67
3 changed files with 263 additions and 0 deletions

16
heap/heap.go Normal file
View File

@@ -0,0 +1,16 @@
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}
}