Re: How to implement heap as a binary tree in lisp?




By weight do you mean the depth/height of each node? Could you please
elaborate it a bit.
Thanks

I mean the number elements in the sub-tree rooted at each node.

(defstruct heap-node
item
weight
left
right)

I'm sorry I'm at work and don't have time to expand. Check out
http://common-lisp.net/project/funds/


.



Relevant Pages