answersLogoWhite

0


Best Answer

Minimum is h nodes

(Maximum is 2h+1 - 1 nodes, if tree consisting of only one node is considered to have height of 0. if you consider a tree with one node to be a height of one, then the minimum nodes is (2^(h-1)) 1 nodes.

Minimum number of nodes in a binary tree of height is 2h+1.

For example, if the height of the binary tree is 3, minimum number of nodes is

2*3+1=7.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

It depends on what operations you wish to perform. Inserting a new node into a binary tree such that a depth-first traversal produces a sorted list will take O(log n) time on average, where log n is the binary logarithm of n. The best case is O(1) where the tree has no nodes and the new node becomes the root. The worst and average case is O(log n) where log n is the binary logarithm of n, where n is the number of nodes currently in the tree.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

You've already answered your own question: it's h.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

Hej

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the height of a complete binary tree of height h have?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the minimum no of nodes in a complete binary tree of height h?

h+1


The height of Complete Binary tree is in terms of :option1. n2. logn3. n^2?

The height of a complete binary tree is in terms of log(n) where n is the number of nodes in the tree. The height of a complete binary tree is the maximum number of edges from the root to a leaf, and in a complete binary tree, the number of leaf nodes is equal to the number of internal nodes plus 1. Since the number of leaf nodes in a complete binary tree is equal to 2^h where h is the height of the tree, we can use log2 to find the height of a complete binary tree in terms of the number of nodes.


How many non leaf nodes are there in a complete binary tree of height h?

4


What is the height of binary search tree in worst case?

In the worst case a binary search tree is linear and has a height equal to the number of nodes. so h=O(h).


What is an almost complete binary tree?

An almost complete binary tree is a tree in which each node that has a right child also has a left child. Having a left child does not require a node to have a right child. Stated alternately, an almost complete binary tree is a tree where for a right child, there is always a left child, but for a left child there may not be a right child.The number of nodes in a binary tree can be found using this formula: n = 2^h Where n is the amount of nodes in the tree, and h is the height of the tree.


In binary search tree n equals nodes h equals height of tree what is time complexity?

O(h)


What are the properties of binary tree?

A binary tree of n elements has n-1 edgesA binary tree of height h has at least h and at most 2h - 1 elementsThe height of a binary tree with n elements is at most n and at least ?log2 (n+1)?


What is the height of a binary tree with n nodes in the worst case?

For the height `h' of a binary tree, for which no further attributes are given than the number `n' of nodes, holds:ceil( ld n)


What is complexity of binary search tree?

The complexity of binary search tree : Search , Insertion and Deletion is O(h) . and the Height can be of O(n) ( if the tree is a skew tree). For Balanced Binary Trees , the Order is O(log n).


How many leaf nodes does the full binary tree of height h 3 have?

For a full binary tree of height 3 there are 4 leaf nodes. E.g., 1 root, 2 children and 4 grandchildren.


What is the Maximum number of node at height h of a binary tree?

It is ((2^h) -1)/(2-1) generally for an m-tree is: ((m^h)-1)/(m-1)


Difference between almost complete binary tree and complete binary tree?

A full tree is a tree where all nodes except the leaves have the maximum number of children. For a BST, that would be two children per node. A complete tree is the same thing, except that the bottom level does not need to be full. It can be missing leaf nodes, however the ones present must be shifted to the left.