Given a BST with N nodes, how many tree shapes are there with height N-1? Explain your reasoning.
Given a BST with N nodes, how many tree shapes are there with height N-2? Explain your reasoning .
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
Given a BST with N nodes ,
then the maximum height of that tree will be N-1.
given that height is N-1 , then it means all nodes will have only one child like a chain structure .
the total number of Binary Tree possible with N nodes = (2NCN) / (N+1)
Given a BST with N nodes , and height is N-2
The minimum depth of a binary tree is [ log3n ] and
the maximum depth is N
So in each level there will be [ (2NCN) / (N+1) ] / [ (N - 2 ) - ([ log3n ]) ] nodes.
Get Answers For Free
Most questions answered within 1 hours.