mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
heap sort order backwards
This commit is contained in:
parent
ab52a803b8
commit
fd800e130c
1 changed files with 2 additions and 0 deletions
2
cache.go
2
cache.go
|
|
@ -243,6 +243,8 @@ type PairHeap struct {
|
|||
Pairs
|
||||
}
|
||||
|
||||
func (p PairHeap) Less(i, j int) bool { return p.Pairs[i].Count < p.Pairs[j].Count }
|
||||
|
||||
func (h *Pairs) Push(x interface{}) {
|
||||
// Push and Pop use pointer receivers because they modify the slice's length,
|
||||
// not just its contents.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue