Hostname: page-component-586b7cd67f-t7czq Total loading time: 0 Render date: 2024-11-27T20:44:22.200Z Has data issue: false hasContentIssue false

On constructing 2-3 trees

Published online by Cambridge University Press:  26 October 2018

RALF HINZE*
Affiliation:
Fachbereich Informatik, Technische Universität Kaiserslautern67653 Kaiserslautern, Germany (e-mail: [email protected])
Rights & Permissions [Opens in a new window]

Abstract

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.

We consider the task of constructing 2-3 trees. Given a sequence of elements we seek to build a 2-3 tree–in linear time–that contains the elements in symmetric order. We discuss three approaches: top-down, bottom-up, and incremental. The incremental approach is more flexible than the other two in that it allows us to interleave the construction work with other operations, for example, queries.

Type
Functional Pearl
Copyright
© Cambridge University Press 2018 

References

Aho, A. V., Hopcroft, J. E. & Ullman, J. D. (1974) The Design and Analysis of Computer Algorithms. Addison-Wesley Publishing Company.Google Scholar
Braun, W. & Rem, M. (1983) A Logarithmic Implementation of Flexible Arrays. Memorandum MR83/4, Eindhoven University of Technology.Google Scholar
Hinze, R. (1999) Constructing red-black trees. In Proceedings of the Workshop on Algorithmic Aspects of Advanced Programming Languages (WAAAPL’99), Okasaki, C. (ed), pp. 8999. The proceedings appeared as a technical report of Columbia University, CUCS-023-99.Google Scholar
Hinze, R. (2001) Manufacturing datatypes. J. Funct. Program. 11(5), 493524.CrossRefGoogle Scholar
Hinze, R. (2009) Functional Pearl: Purely functional 1-2 brother trees. J. Funct. Program. 19(6), 633644.CrossRefGoogle Scholar
Hinze, R. & Paterson, R. (2006) Finger trees: A simple general-purpose data structure. J. Funct. Program. 16(2), 197217.CrossRefGoogle Scholar
Hoffmann, C. M. & O’Donnell, M. J. (1982) Programming with equations. ACM Trans. Program. Lang. Syst. 4(1), 83112.CrossRefGoogle Scholar
Okasaki, C. (1997) Functional Pearl: Three algorithms on Braun trees. J. Funct. Program. 7(6), 661666.CrossRefGoogle Scholar
Okasaki, C. (1998) Purely Functional Data Structures. Cambridge University Press.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.