Electronic Proceedings in Theoretical Computer Science (Dec 2014)

Simple Balanced Binary Search Trees

  • Prabhakar Ragde

DOI
https://doi.org/10.4204/EPTCS.170.6
Journal volume & issue
Vol. 170, no. Proc. TFPIE 2014
pp. 78 – 87

Abstract

Read online

Efficient implementations of sets and maps (dictionaries) are important in computer science, and balanced binary search trees are the basis of the best practical implementations. Pedagogically, however, they are often quite complicated, especially with respect to deletion. I present complete code (with justification and analysis not previously available in the literature) for a purely-functional implementation based on AA trees, which is the simplest treatment of the subject of which I am aware.