theodesp / go-heaps

Reference implementations of heap data structures in Go - treap, skew, leftlist, pairing, fibonacci
MIT License
96 stars 29 forks source link

fix maxBucketSize #41

Open zhiqiangxu opened 4 years ago

zhiqiangxu commented 4 years ago

This PR tries to make maxBucketSize more close to (log n) + 1.

i.e, it returns 1 for size 1, returns 2 for size 2,3, returns 3 for size 4,5,6,7 etc.

codecov-io commented 4 years ago

Codecov Report

Merging #41 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #41   +/-   ##
=======================================
  Coverage   85.43%   85.43%           
=======================================
  Files           7        7           
  Lines         728      728           
=======================================
  Hits          622      622           
  Misses         78       78           
  Partials       28       28
Impacted Files Coverage Δ
rank_pairing/rank_pairing_heap.go 83.73% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 88e3535...e52c692. Read the comment docs.

zhiqiangxu commented 4 years ago

@theodesp Could you help verify this PR?