search
Log In

Recent questions tagged tree

0 votes
2 answers
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?
asked Mar 24 in Databases jothee 81 views
0 votes
0 answers
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
asked Apr 13, 2019 in DS kd..... 93 views
0 votes
1 answer
3
The number of possible ordered trees with 3 nodes A,B,C is ??
asked Mar 22, 2019 in DS sandeep singh gaur 112 views
0 votes
1 answer
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
asked Mar 10, 2019 in Algorithms s_dr_13 323 views
0 votes
1 answer
5
what is the maximum possible hight of AVL tree with 54 node? is there any general method to solve this question?
asked Dec 28, 2018 in DS Rahul_Rathod_ 210 views
0 votes
0 answers
6
Please suggest how to learn AVL rotation in AVL trees and some good practice questions or link would be so much helpful Thanks
asked Nov 2, 2018 in Programming Mayankprakash 93 views
0 votes
1 answer
7
0 votes
1 answer
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
asked Aug 27, 2018 in DS hrcule 135 views
0 votes
1 answer
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
asked Aug 21, 2018 in DS Na462 748 views
0 votes
1 answer
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?
asked Aug 4, 2018 in DS Naveen Kumar 3 194 views
1 vote
1 answer
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
asked Jul 16, 2018 in Programming hrcule 902 views
1 vote
2 answers
12
how the b and b+ tree formulae computed can u explain with the proof
asked Jun 24, 2018 in Databases vijju532 304 views
0 votes
1 answer
13
Is the root node an internal node?
asked Jun 24, 2018 in Programming once_2019 116 views
0 votes
0 answers
14
how does linux kernel uses the red black tree property ???elabourate
asked Jun 13, 2018 in Algorithms vijju532 53 views
0 votes
1 answer
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.
asked May 15, 2018 in DS Akhilesh Singla 223 views
1 vote
1 answer
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?
asked Apr 12, 2018 in Programming rahul sharma 5 166 views
2 votes
2 answers
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
asked Mar 21, 2018 in DS Mohit Srivastava 1.4k views
2 votes
1 answer
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 ________.
asked Mar 11, 2018 in DS pankaj_vir 159 views
1 vote
2 answers
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?
asked Jan 28, 2018 in DS gauravkc 247 views
3 votes
0 answers
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 ______.
asked Jan 7, 2018 in DS iarnav 273 views
0 votes
1 answer
21
Does values in Leaf nodes of B+ tree repeats or ever leaf node has an unique value?
asked Dec 15, 2017 in Databases iarnav 561 views
1 vote
1 answer
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 ________.
asked Nov 30, 2017 in Databases Tuhin Dutta 345 views
0 votes
2 answers
23
2 votes
0 answers
24
asked Nov 14, 2017 in Programming Lakshman Patel RJIT 73 views
1 vote
2 answers
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
asked Oct 6, 2017 in Programming rahul sharma 5 213 views
2 votes
1 answer
26
What is the worst case time complexity to construct unique BST from a:) Inorder and preorder a:) Inorder and postorder
asked Oct 2, 2017 in Programming rahul sharma 5 150 views
1 vote
1 answer
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 ?
asked Jun 26, 2017 in Programming cjoshi 143 views
0 votes
3 answers
28
If a node in a BST has two children, then its in-order predecessor has a) No left child b) No right child c) 2 children d) no child
asked Feb 8, 2017 in DS smartmeet 2.6k views
0 votes
2 answers
29
A 5-ary tree is a tree in which every internal node has 3 children.The number of leaf nodes in such a tree with 10 internal nodes is______
asked Jan 24, 2017 in Programming iita 257 views
2 votes
1 answer
30
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$
asked Jan 18, 2017 in DS smartmeet 203 views
...