Abstract

The chapter focuses on binary trees that are a special case of trees in which each parent can have, at most, only two children that are ordered. The chapter defines various types of binary trees, such as complete binary trees, perfect binary tree, balanced binary trees, Adelson-Velskii and Landis (AVL) tree, height-balanced tree, and Fibonacci tree. In procedural programming languages, binary trees are represented with pointer chains or in one-dimensional array, where the array subscript determines the relationship the node holds within the tree structure. A binary tree is used for searching, by placing data in the nodes in such a way that for every node in the tree, all the nodes in its left subtree are less than the parent node's value and all the nodes in its right are greater than the parent node's value. The chapter explains techniques for operations such as, insertion, deletion, traversing, and binary tree query on binary trees. Binary tree have a predictable growth pattern that allows assigning a single number to locate each node and sequentially number the nodes across the levels in the tree from left to right. This structure is also known as heap, when it is presented in an array and is the basis for the heapsort algorithm described in the chapter. The chapter also discusses the method of representing multiway trees in the form of binary trees and the Stern-Brocot Numbers.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.