Messages in this thread | | | Date | Sun, 11 Jan 1998 19:29:02 -0500 (EST) | From | "James R. Van Zandt" <> | Subject | Re: 2.1.78: mm and networking questions... |
| |
Kai Henningsen writes: >kwrohrer@enteract.com wrote on 09.01.98: > >> Well, you got license to a solid, lean red-black tree implementation? >> If so, drop it in! Same for a solid, lean AVL tree implementation. >> If starting from scratch I'd prefer the red-black tree because >> I know there are good algorithm descriptions out there; I haven't >> seen good pseudo-code for AVL trees yet. > >The "Handbook of Algorithms and Data Structures" has vode for AVL insert >and left rotation, if you're interested. Not so for red-black trees.
See:
Bruce Schneier, "Red-Black Trees", Dr. Dobb's Journal #187, Apr 1992, pp 42-46.
He has pseudocode only. He recommends red-black trees for data that is uniformly accessed and frequently updated. When some nodes are accessed much more frequently than most others, self-adjusting structures like splay trees are better. For example:
Andrew M. Liao, "Self-Adjusting Data Structures", Dr. Dobb's Journal #161, Feb 1990, pp 44-57 and 105-107.
- Jim Van Zandt
| |