Gabriel Scherer a écrit :
The heap implementation in the OCaml manual, which was pointed to in the 
precedent thread, is quite compact.

Okasaki (eg. in its book "Purely functional data structure", but can probably 
be found in papers available on the net)
has a "leftist heap" data structure that is also compact and, to my personal 
taste, easier to understand, get familiar
with and remember than the usual heap implementation -- or more exotic heaps. I 
was once in a situation similar to yours
and found that I could implement both his leftist heap and the red-black trees 
in around 15 minutes.


Did you need red-black trees, though, during the exam?

--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to