MOO-cows Mailing List Archive

[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

re:hash & balanced trees



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

References:
Home | Subject Index | Thread Index