theodesp / go-heaps

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

Add Treap Implementation #13

Closed theodesp closed 5 years ago

theodesp commented 5 years ago

https://en.wikipedia.org/wiki/Treap

koneko096 commented 5 years ago

Hi @theodesp I will work on it

theodesp commented 5 years ago

Cool

theodesp commented 5 years ago

Hey @koneko096 just for curiosity what happens if the Priority comparison is different from the heap.Item ?

koneko096 commented 5 years ago

Hi @theodesp Nothing in particular. I just thought using compare interface make it more consistent