Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Red-black trees in a functional setting

Published: 01 July 1999 Publication History

Abstract

Everybody learns about balanced binary search trees in their introductory computer science classes, but even the stouthearted tremble at the thought of actually implementing such a beast. The details surrounding rebalancing are usually just too messy. To show that this need not be the case, we present an algorithm for insertion into red-black trees (Guibas and Sedgewick, 1978) that any competent programmer should be able to implement in fifteen minutes or less.

References

[1]
Adams, S. (1993) Efficient sets - a balancing act. J. Functional Programming, 3(4): 553-561.
[2]
Andersson, A. (1991) A note on searching in a binary search tree. Software--Practice and Experience, 21(10): 1125-1128.
[3]
Cormen, T. H., Leiserson, C. E. and Rivest, R. L. (1990) Introduction to Algorithms. MIT Press.
[4]
Fähndrich, M. and Boyland, J. (1997) Statically checkable pattern abstractions. ACM SIGPLAN International Conference on Functional Programming, pp. 75-84.
[5]
Guibas, L. J. and Sedgewick, R. (1978) A dichromatic framework for balanced trees. IEEE Symposium on Foundations of Computer Science, pp. 8-21.
[6]
Hudak, P. et al. (1992) Report on the functional programming language Haskell, Version 1.2. SIGPLAN Notices, 27(5).
[7]
Núñez, M., Palao, P. and Peña, R. (1995) A second year course on data structures based on functional programming. Functional Programming Languages in Education: Lecture Notes in Computer Science 1022, pp. 65-84. Springer-Verlag.
[8]
Reade, C. M. P. (1992) Balanced trees with removals: an exercise in rewriting and proof. Science of Computer Programming, 18(2): 181-204.
[9]
Weiss, M. A. (1998) Data Structures & Problem Solving Using Java. Addison-Wesley.

Cited By

View all
  • (2024)The Functional Essence of Imperative Binary Search TreesProceedings of the ACM on Programming Languages10.1145/36563988:PLDI(518-542)Online publication date: 20-Jun-2024
  • (2024)Revisiting 2–3 red–black trees with a pedagogically sound yet efficient deletion algorithm: parity-seekingActa Informatica10.1007/s00236-023-00452-661:3(199-229)Online publication date: 1-Sep-2024
  • (2023)A Rotation of Data StructuresJournal of Computing Sciences in Colleges10.5555/3606402.360641038:8(29-38)Online publication date: 1-Apr-2023
  • Show More Cited By
  1. Red-black trees in a functional setting

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Journal of Functional Programming
    Journal of Functional Programming  Volume 9, Issue 4
    July 1999
    130 pages

    Publisher

    Cambridge University Press

    United States

    Publication History

    Published: 01 July 1999

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 06 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)The Functional Essence of Imperative Binary Search TreesProceedings of the ACM on Programming Languages10.1145/36563988:PLDI(518-542)Online publication date: 20-Jun-2024
    • (2024)Revisiting 2–3 red–black trees with a pedagogically sound yet efficient deletion algorithm: parity-seekingActa Informatica10.1007/s00236-023-00452-661:3(199-229)Online publication date: 1-Sep-2024
    • (2023)A Rotation of Data StructuresJournal of Computing Sciences in Colleges10.5555/3606402.360641038:8(29-38)Online publication date: 1-Apr-2023
    • (2023)FP²: Fully in-Place Functional ProgrammingProceedings of the ACM on Programming Languages10.1145/36078407:ICFP(275-304)Online publication date: 31-Aug-2023
    • (2023)Rigorous Pattern Matching as a Language FeatureACM SIGAda Ada Letters10.1145/3591335.359134242:2(69-74)Online publication date: 5-Apr-2023
    • (2023)Faster, Simpler Red-Black TreesTrends in Functional Programming10.1007/978-3-031-38938-2_3(36-50)Online publication date: 12-Jan-2023
    • (2023)Space-Efficient Functional Offline-Partially-Persistent Trees with Applications to Planar Point LocationAlgorithms and Data Structures10.1007/978-3-031-38906-1_43(644-659)Online publication date: 31-Jul-2023
    • (2022)Reference counting with frame limited reuseProceedings of the ACM on Programming Languages10.1145/35476346:ICFP(357-380)Online publication date: 31-Aug-2022
    • (2021)Perceus: garbage free reference counting with reuseProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454032(96-111)Online publication date: 19-Jun-2021
    • (2020)Adding interactive visual syntax to textual codeProceedings of the ACM on Programming Languages10.1145/34282904:OOPSLA(1-28)Online publication date: 13-Nov-2020
    • Show More Cited By

    View Options

    View options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media