theodesp / go-heaps

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

Add Treap Implementation #13

Closed theodesp closed 6 years ago

theodesp commented 6 years ago

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

koneko096 commented 6 years ago

Hi @theodesp I will work on it

theodesp commented 6 years ago

Cool

theodesp commented 6 years ago

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

koneko096 commented 6 years ago

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