hash & balanced trees
Michael Brundage (brundage@piaf.ipac.caltech.edu)
Mon, 7 Jul 1997 06:03:55 -0700 (PDT)
On Mon, 30 Jun 1997, Charles Victor Bancroft wrote:
> Balanced binary trees are O(log(n)) on searches, and algortithms such as AVL
> trees have acceptable insertion and deletion measures. Besides, there is c
> source code available.
In this same vein, there's an article on "treaps" in this month's Dr.
Dobb's Journal (with accompanzing source code for Java). Insertion,
deletion, and sorting are all O(log(n)) operations for treaps, and in
fact the author(s) basically propose using Treap instead of Hashtable
whenever one needs an ordered data structure and efficiency is an issue.
Another nice property is that treaps area apparently hashtable, ordered
list, and balanced tree all in one. They might make a suitable addition
to MOO for these reasons.
Cheers,
michael
brundage@ipac.caltech.edu