Achieving a uniform interface for binary tree implementations

  • Authors:
  • Chaya Gurwitz

  • Affiliations:
  • Brooklyn College of the City University of New York

  • Venue:
  • SIGCSE '95 Proceedings of the twenty-sixth SIGCSE technical symposium on Computer science education
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

One of the basic principles taught in a data structures course is that an application program should be independent of the implementation of any particular data structure it uses. This policy breaks down when binary trees are introduced, because the interfaces for the various representations of binary trees are not uniform. In particular, implementing a binary tree by using an implicit array generally requires the array itself to be passed as a parameter to any function that manipulates the tree. In this paper we present an approach for defining the implicit array representation of a binary tree. Our definition makes the underlying array transparent to the user. This allows us to describe a uniform interface for a binary tree module that can be used by an application program regardless of the particular implementation of the tree.