# Recent questions tagged tree 1
If following sequence of keys are inserted in a $B+$ tree with $K(=3)$ pointers: $8,5,1,7,3,12,9,6$ Which of the following shall be correct $B+$ tree?
2
here what to do first as FIZZA and IMRAN both are unbalanced than either to do RR rotation from FIZZA-IMRAN-NAVEEN or RL rotation from IMRAN-NAVEEN-LOVELY
3
The number of possible ordered trees with 3 nodes A,B,C is ??
4
Consider the following binary tree with root at level 0. What is the internal path length for the above tree? 31 14 29 32
5
what is the maximum possible hight of AVL tree with 54 node? is there any general method to solve this question?
6
Please suggest how to learn AVL rotation in AVL trees and some good practice questions or link would be so much helpful Thanks
7
8
How to solve question of the following type without creating a tree for each given option. Which of the following order of elements are inserted into an empty AVL tree so that it is possible to get the above AVL tree. A. 94,71,86,25,98,83,27,90 B 98,94,90,83,86,25,71,27 C. 86,25,98,83,27,90,71,94 D. None of these
9
Consider following statements: S1: Rotation operation in AVL always preserves the Inorder ordering. S2: The median of all elements in AVL tree is always at root or one of its two children. S3: If every node in BST has either 0 or 2 children,then searching is O(logn) S4: In a 3 array tree. If number of internal node is 20 then number of Leaves are 41. True Statements ? Ans: Only S1 and S4
10
1. How many Binary trees can be made with: (a) 3 unlabelled nodes? (b) 3 labelled nodes? 2. How many Binary Search trees can be made with: (a) 3 unlabelled nodes? (b) 3 labelled nodes? 3. How many AVL trees can be made with: (a) 3 unlabelled nodes? (b) 3 labelled nodes? Can these be generalised for 'n' nodes?
1 vote
11
Let T be a binary search tree with n nodes and Sn be the average number of comparisons required for successful search and Un be the average number of comparison required for an unsuccessful search. Then what is the relation between Sn, Un and n
1 vote
12
how the b and b+ tree formulae computed can u explain with the proof
13
Is the root node an internal node?
14
how does linux kernel uses the red black tree property ???elabourate
15
Minimum number of internal nodes in an AVL tree with height 5? Please give a standard procedure that can be applied to larger heights as well. I know the formula: S(h) = S(h-1) + S(h-2) + 1, but here it is asked for internal nodes only. Drawing a tree is tedious.
1 vote
16
a:) If given Tree is BST => Inorder of keys is sorted b:) Inorder of keys is sorted => Tree is BST(converse of above) I know first one holds.Is second one also true?If not can someone give counter example?
17
In delete operation of BST, we need inorder successor (or predecessor) of a node when the node to be deleted has both left and right child as non-empty. Which of the following is true about inorder successor needed in delete operation? Inorder Successor is always ... Inorder successor may be an ancestor of the node Inorder successor is always either a leaf node or a node with empty right child
18
Consider the following elements inserted into an empty AVL tree in the following order 25, 10, 15, 17, 30, 35, 40, 21, 28 If [L(d)] be the sum of elements on left side of root and (Rd) be the sum of elements on right side of root, then the value of [(Rd) – (Ld) + Root] is ________.
1 vote
19
Suppose we have an AVL tree of n nodes and any change in the tree violates the AVL tree property then :- S1: If we insert an element in the tree, maximum 2 Rotations are required to make the Tree AVL again. S2: If we delete an element from the tree, maximum 2 Rotations are required to make tree AVL again Which are correct statements?
20
Consider a binary tree T that has 150 leaf nodes. Then the number of TOTAL nodes in T that have exactly two children are ______.
21
Does values in Leaf nodes of B+ tree repeats or ever leaf node has an unique value?
1 vote
22
Assume a system has following parameters to construct a B+ tree. The specification of the tree are: • Size of search key is 15 B • Size of block is 512 B • Size of record pointer is 9 B • Size of block pointer is 8 B The maximum number of keys that can be accommodated in each non-leaf node of the tree is ________.
23
24
1 vote
25
What is the time complexity to delete the root node in right skew tree? I knew the three cases of BST deletion:- 0 child,one child,two child. But how can we handle this particular question
26
What is the worst case time complexity to construct unique BST from a:) Inorder and preorder a:) Inorder and postorder
1 vote
27
Q-We are given set of n distinct elements and an unlabled binary tree with n nodes how many ways we can populate the tree with given set so that it becomes binary search tree ?
The minimum number of vertices having degree $1$ in a tree of at least $10$ vertices is ______________. If we consider this question, then the first answer comes in our mind is $'2',$ right? But what if Tree isn't binary? if the root node has $9$ leaf nodes, so all those nodes having degree $1,$ right$?$ So the answer could be$:9$