Question

An empty tree has height ________ A tree with just a root and no other nodes...

An empty tree has height ________

A tree with just a root and no other nodes has height___

The root is at depth_____

What is the maximum possible height for a tree with 31 nodes?

What is the minimum possible height for a tree with 31 nodes?

Homework Answers

Answer #1

First we have to know what is height of a tree ,it is nothing but distance from root node to any node.

Answer:0

​​​​​​empty tree has height 0

Beacuse it does not contain any nodes or elements ,so it has height 0

Answer:0

A tree with just a root and no other nodes has hieght 0

As it has only root node because it has no leaf nodes so it has height 0 as leaf nodes height is

Answer:0

As said previously root is at depth 0

As it doesn't have children, children of root is at depth 1.

Answer:30

Because

Maximum height of tree is

H=N-1

For unbalanced tree

Where H is height

31-1=30

Answer:4

Beacause minimum height of a tree is

log base2(N+1)-1

=5-1

=4

this is the minimum height

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. a) Suppose that a binary tree of height h has n nodes. Show that h...
1. a) Suppose that a binary tree of height h has n nodes. Show that h ≥ log2 (n+2) - 1. b) Using the formula in part (a) find the minimum height if a binary tree with 1000 nodes. c) What is the maximum possible height of a binary tree with 1000 nodes?
(Algorithm) A binary tree has a height of h=4. What is the number of nodes of...
(Algorithm) A binary tree has a height of h=4. What is the number of nodes of this binary tree if the tree is: a) A full binary tree b) A complete binary tree
(Algorithm) A full binary tree has start node, internal nodes, and leaf nodes. The number of...
(Algorithm) A full binary tree has start node, internal nodes, and leaf nodes. The number of leaf nodes of this binary tree is 256. a) What is the height of the tree? b) How many internal nodes are in the tree?
Problem 3 Given a BST with N nodes, how many tree shapes are there with height...
Problem 3 Given a BST with N nodes, how many tree shapes are there with height N-1? Explain your reasoning. Problem 4 Given a BST with N nodes, how many tree shapes are there with height N-2? Explain your reasoning . Problem 5 Consider an empty 2-3 tree. Draw the tree after each of the following operations is executed: insert 0, insert 9, insert 2, insert 6, insert 7, insert 3, insert 8, delete 2, delete 6
Prove that a full non-empty binary tree must have an odd number of nodes via induction
Prove that a full non-empty binary tree must have an odd number of nodes via induction
Given the list of values below, create a Binary Search Tree for the list, Use the...
Given the list of values below, create a Binary Search Tree for the list, Use the first value in the list as the root of the tree, add the nodes to BST in the order they appear in the list.[50, 44, 82, 39, 35, 98, 87, 100, 74, 23, 34, 14, 94] What is the minimum height of a Binary Tree that contains 24nodes? What is the minimum height of a Binary Tree that contains 64nodes? What is the minimum...
A binary tree isfullif every non-leaf node has exactly two children. For context, recallthat we saw...
A binary tree isfullif every non-leaf node has exactly two children. For context, recallthat we saw in lecture that a binary tree of heighthcan have at most 2h+1−1 nodes, and thatit achieves this maximum if it iscomplete, meaning that it is full and all leaves are at the samedistance from the root. Findμ(h), theminimumnumber of nodes that a full tree of heighthcan have, and prove your answer using ordinary induction onh. Note that tree of height of 0 isa single...
In heapsort we view an array as a binary tree using the following mapping: a[0] is...
In heapsort we view an array as a binary tree using the following mapping: a[0] is the root of the entire tree and for element a[i], its left child is a[2i+1] and its right child is a[2i+2]. Answer the following questions for an array of size n. ( Answers in some cases may be in terms of n.) a) What is the index of the parent a[i] for any i > 0? b) What is the biggest index for which...
import java.util.ArrayList; /* Rules:         1. Allow Tester to iterate through all nodes using the...
import java.util.ArrayList; /* Rules:         1. Allow Tester to iterate through all nodes using the in-order traversal as the default.             This means, in Tester the following code should work for an instance of this class             called bst that is storing Student objects for the data:                 BinarySearchTree_Lab08<String> bst = new BinarySearchTree_Lab08<String>();                 bst.add("Man");       bst.add("Soda");   bst.add("Flag");                 bst.add("Home");   bst.add("Today");   bst.add("Jack");                ...
Let XX represent the full height of a certain species of tree. Assume that XX has...
Let XX represent the full height of a certain species of tree. Assume that XX has a normal probability distribution with mean 186.3 ft and standard deviation 75.6 ft. You intend to measure a random sample of n=233 treess. The bell curve below represents the distibution of these sample means. The scale on the horizontal axis is the standard error of the sampling distribution. Complete the indicated boxes, correct to two decimal places. What is the Standard Deviation? What is...