home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsc!cbfsb!att-out!pacbell.com!network.ucsd.edu!sdcc12!sdcc13!sboswell
- From: sboswell@sdcc13.ucsd.edu (Xianity is stupid)
- Newsgroups: comp.programming
- Subject: Re: AVL trees - Re: Why Are Red-Black Trees Obscure?
- Message-ID: <37981@sdcc12.ucsd.edu>
- Date: 12 Sep 92 17:28:29 GMT
- References: <14298@goanna.cs.rmit.oz.au> <1992Sep1.142904.430@rz.uni-karlsruhe.de> <1992Sep2.022227.9117@reed.edu>
- Sender: news@sdcc12.ucsd.edu
- Organization: U.C. San Diego -- 1991 "Wannabe A Real College" finalist
- Lines: 33
- Nntp-Posting-Host: sdcc13.ucsd.edu
-
- In article <1992Sep2.022227.9117@reed.edu> orpheus@reed.edu (P. Hawthorne) writes:
- > I'll see your point and raise you a point. Deletion, when implementations
- >are given, seem to be efficient largely because of a particularly
- >simplistic representation, like heap allocation. One of the things I want
- >most from a given data structure is containment within a single memory
- >block (size proportional to the number of elements) which can grow, shrink
- >and move around when the structure isn't looking. Hence, my implementations
- >demand offsets rather than pointers, double links, interleaved binary and
- >interpolation search operations, and so on.
- >
- > Deletion is the thorn in my side. I guess that's half the challenge! And
- >who knows, maybe it's not just my eccentricity, but all data structures
- >should have explicit "insert multiple elements" and "delete multiple
- >elements" operations!
-
- I missed the beginning of this thread, so I don't know if y'all needed
- tree structures explicitly, or just a log(n) sorted structure, but I've
- had lots of success with skip lists. The constant factors associated with
- each log(n) operation are significantly smaller than most other sorted
- log(n) structures, and things like dobule links, deletions, range insertions,
- range deletions, and search fingers are idiotically simple to code.
-
- A long time ago I asked for a way to put a "next" pointer into an AVL tree
- so that I could address it like a linked list, and how to modify the insertion
- and deletion algorithms to update the "next" field automatically. Someone
- suggested skip lists, and I've never looked back. :-)
-
- If you want more info, look in mimsy.cs.umd.edu:/pub/skipLists -- there's a
- technical paper on it, plus a "skip list cookbook" and some data on how to
- write a parallel skip list.
-
- Steve Boswell
- whatis@ucsd.edu
-