2005Cambridge University Press eBooksRequires access

Binary Trees and Binary Search Trees

Michael McMillan

Open publisher page 0 citations

Abstract

Trees constitute a very common data structure in computer science. A tree is a nonlinear data structure that is used to store data in a hierarchical manner. We examine one primary tree structure in this chapter, the binary tree, along with one implementation of the binary tree, the binary search tree. Binary trees are often chosen over more fundamental structures, such as arrays and linked lists, because you can search a binary tree quickly (as opposed to a linked list) and you can quickly insert data and delete data from a binary tree (as opposed to an array). DEFINITION OF A TREE Before we examine the structure and behavior of the binary tree, we need to define what we mean by a tree. A tree is a set of nodes connected by edges . An example of a tree is a company's organization chart (see Figure 12.1). The purpose of an organization chart is to communicate to the viewer the structure of the organization. In Figure 12.1, each box is a node and the lines connecting the boxes are the edges. The nodes, obviously, represent the entities (people) that make up an organization. The edges represent relationships among the entities. For example, the CIO (Chief Information Officer) reports directly to the CEO (Chief Executive Officer), so there is an edge between these two nodes. The Development Manager reports to the CIO, so there is an edge connecting them.

About this research paper

What this paper is about

Trees constitute a very common data structure in computer science. A tree is a nonlinear data structure that is used to store data in a hierarchical manner. We examine one primary tree structure in this chapter, the binary tree, along with one implementation of the binary tree, the binary search tree. Binary trees are often chosen over more fundamental structures, such as arrays and linked lists, because you can search a binary tree quickly (as opposed to a linked list) and you can quickly insert data and delete data from a binary tree (as opposed to an array). DEFINITION OF A TREE Before we examine the structure and behavior of the binary tree, we need to define what we mean by a tree. A tree is a set of nodes connected by edges . An example of a tree is a company's organization chart (see Figure 12.1). The purpose of an organization chart is to communicate to the viewer the structure of the organization. In Figure 12.1, each box is a node and the lines connecting the boxes are the edges. The nodes, obviously, represent the entities (people) that make up an organization. The edges represent relationships among the entities. For example, the CIO (Chief Information Officer) reports directly to the CEO (Chief Executive Officer), so there is an edge between these two nodes. The Development Manager reports to the CIO, so there is an edge connecting them.

Why it matters

A significance statement is not available in the OpenAlex record.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

Trees constitute a very common data structure in computer science. A tree is a nonlinear data structure that is used to store data in a hierarchical manner. We examine one primary tree structure in this chapter, the binary tree, along with one implementation of the binary tree, the binary search tree. Binary trees are often chosen over more fundamental structures, such as arrays and linked lists, because you can search a binary tree quickly (as opposed to a linked list) and you can quickly insert data and delete data from a binary tree (as opposed to an array). DEFINITION OF A TREE Before we examine the structure and behavior of the binary tree, we need to define what we mean by a tree. A tree is a set of nodes connected by edges . An example of a tree is a company's organization chart (see Figure 12.1). The purpose of an organization chart is to communicate to the viewer the structure of the organization. In Figure 12.1, each box is a node and the lines connecting the boxes are the edges. The nodes, obviously, represent the entities (people) that make up an organization. The edges represent relationships among the entities. For example, the CIO (Chief Information Officer) reports directly to the CEO (Chief Executive Officer), so there is an edge between these two nodes. The Development Manager reports to the CIO, so there is an edge connecting them.

Key concepts: Random binary tree, Optimal binary search tree, Binary tree, Ternary search tree, Interval tree, Self-balancing binary search tree, Binary search tree, Computer science

Related papers

Back to paper searchBrowse research topicsOriginal source
Binary Trees and Binary Search Trees — Research Paper | ScholarLens