Hostname: page-component-77f85d65b8-grvzd Total loading time: 0 Render date: 2026-03-26T20:11:01.199Z Has data issue: false hasContentIssue false

Purely Functional 1-2 Brother Trees

Published online by Cambridge University Press:  26 May 2009

RALF HINZE*
Affiliation:
Computing Laboratory, University of Oxford, Wolfson Building, Parks Road, Oxford OX1 3QD, England (e-mail: ralf.hinze@comlab.ox.ac.uk)
Rights & Permissions [Opens in a new window]

Extract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Enter the computing arboretum and you will find a variety of well-studied trees: AVL trees (Adel'son-Vel'skiĭ & Landis 1962), symmetric binary B-trees (Bayer 1972), Hopcroft's 2-3 trees (Aho et al. 1974), the bushy finger trees (Guibas et al. 1977) and the colourful red-black trees (Guibas & Sedgewick 1978). In this pearl, we look at a more exotic species of balanced search trees, 1-2 brother trees (Ottmann et al. 1979), which deserves to be better known. Brother trees lend themselves well to a functional implementation with deletion (Section 5) as straightforward as insertion (Section 3), both running in logarithmic time. Furthermore, brother trees can be constructed from ordered lists in linear time (Section 4). With some simple optimisations in place, this implementation of search trees is one of the fastest around. So, fasten your seat belts.

Information

Type
Functional Pearls
Copyright
Copyright © Cambridge University Press 2009
Submit a response

Discussions

No Discussions have been published for this article.