Finger trees: a simple general-purpose data structure

  • Authors:
  • Ralf Hinze;Ross Paterson

  • Affiliations:
  • Institut für Informatik III, Universität Bonn, Römerstraße 164, 53117 Bonn, Germany (e-mail: ralf@informatik.uni-bonn.de);Department of Computing, City University, London EC1V OHB, UK (e-mail: ross@soi.city.ac.uk)

  • Venue:
  • Journal of Functional Programming
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

We introduce 2-3 finger trees, a functional representation of persistent sequences supporting access to the ends in amortized constant time, and concatenation and splitting in time logarithmic in the size of the smaller piece. Representations achieving these bounds have appeared previously, but 2-3 finger trees are much simpler, as are the operations on them. Further, by defining the split operation in a general form, we obtain a general purpose data structure that can serve as a sequence, priority queue, search tree, priority search queue and more.