The document outlines the definitions and properties of binary trees, including full, complete, and perfect binary trees, and discusses their height, depth, number of nodes, and sum of degrees. It also addresses the characteristics of leaf and non-leaf nodes and explores the implications of node relationships in binary search trees (BSTs). Additionally, it clarifies the distinctions between different types of binary trees and their structural attributes.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views1 page
Binary Tree Questions
The document outlines the definitions and properties of binary trees, including full, complete, and perfect binary trees, and discusses their height, depth, number of nodes, and sum of degrees. It also addresses the characteristics of leaf and non-leaf nodes and explores the implications of node relationships in binary search trees (BSTs). Additionally, it clarifies the distinctions between different types of binary trees and their structural attributes.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
Consider a Binary Tree T of height h and depth d.
1. Binary Tree: Definition
• h = d? • Height of a node (X) + Depth of a node (X) = h? • Height of a node (X) + Depth of a node (X) = d? • Height of a node (X) = Depth of a node (X)? 2. Full/Complete/Perfect Binary Tree: Definition • Every full binary tree is complete binary tree? • Every full binary tree is perfect binary tree? • Every complete binary tree is full binary tree? • Every complete binary tree is perfect binary tree? • Every perfect binary tree is full binary tree? • Every perfect binary tree is complete binary tree? 3. Full/Complete/Perfect Binary Tree: Number of Nodes • Maximum/Minimum number of nodes in a full binary tree of height h? • Maximum/Minimum number of nodes in a complete binary tree of height h? • Maximum/Minimum number of nodes in a perfect binary tree of height h? • Maximum/Minimum number of nodes in a full binary tree of depth d? • Maximum/Minimum number of nodes in a complete binary tree of depth d? • Maximum/Minimum number of nodes in a perfect binary tree of depth d? 4. Full/Complete/Perfect Binary Tree: Height/Depth • Maximum/Minimum height of a full binary tree having n nodes? • Maximum/Minimum height of a complete binary tree having n nodes? • Maximum/Minimum height of a perfect binary tree having n nodes? • Maximum/Minimum depth of a full binary tree having n nodes? • Maximum/Minimum depth of a complete binary tree having n nodes? • Maximum/Minimum depth of a perfect binary tree having n nodes? 5. Full/Complete/Perfect Binary Tree: Sum of Degree • Maximum/Minimum sum of the degrees of all the nodes in a full binary tree of height h? • Maximum/Minimum sum of the degrees of all the nodes in a complete binary tree of height h? • Maximum/Minimum sum of the degrees of all the nodes in a perfect binary tree of height h? • Maximum/Minimum sum of the degrees of all the nodes in a full binary tree of depth d? • Maximum/Minimum sum of the degrees of all the nodes in a complete binary tree of depth d? • Maximum/Minimum sum of the degrees of all the nodes in a perfect binary tree of depth d? 6. Full/Complete/Perfect Binary Tree: Leaf/Non-leaf Nodes • Maximum/Minimum number of leaf nodes in a full binary tree of height h? • Maximum/Minimum number of leaf nodes in a complete binary tree of height h? • Maximum/Minimum number of leaf nodes in a perfect binary tree of height h? • Maximum/Minimum number of non-leaf nodes in a full binary tree of height h? • Maximum/Minimum number of non-leaf nodes in a complete binary tree of height h? • Maximum/Minimum number of non-leaf nodes in a perfect binary tree of height h? 7. Why successor/predecessor of a node in a BST can/cannot have two children. 8. Let T be a BST with n nodes. What will be the size of the array if we store T using array. Assume that the key value of each node is an integer so that you can use integer array. 9. Why every perfect binary tree is also a full binary tree but vice-versa is not true.