Recent questions tagged binary-search-tree

4 votes
5 answers
91
Let us there are n nodes which are labelled.Then the number of trees possible is given by the Catalan Number i.e $\binom{2n}{n} / (n+1)$Then the binary search trees possi...
0 votes
1 answer
93
Can binary serach tree have duplicate elements in the tree?
0 votes
2 answers
98
0 votes
1 answer
99
the number of binary search trees with 4 nodes (1 , 2 , 3 , 4) where 1 is always a leaf node?
1 votes
1 answer
102
____ is the worst-case time complexity for all operations (i.e.,) search, update and delete) in a general Binary Search tree$O(n)$$O(n \log n)$$O( \log n)$ for search and...
0 votes
0 answers
103
https://gateoverflow.in/132037/self-doubt-in-binary-search-algoDOUBT : THIS QUESTION 10 ELEMENTS ARE IN ARRAY AND SORTED THEN HOW CAN WE DRAW A BALANCED TREE BECZ IT I...
0 votes
0 answers
106
Consider a binary search tree for the following sequence of nodes $a,b,g,f,c,e,d$What is the resultant tree if splaying is done at $'d'.$
0 votes
0 answers
107
Consider 4 labeled 1,2,3,4. The number of distinct binary tree possible such that whose inorder traversal is 1,2,3,4 are ........
0 votes
1 answer
108
what are the applications of optimal binary search tree?
–1 votes
0 answers
110
0 votes
1 answer
112
Let T (n) be the number of comparisons needed in a binary search of a list of n elements. What is the recurrence relation? Explain. 1) T(n) = T(n/2) + 22) T(n) = T(n/2) +...
1 votes
2 answers
114
1 votes
1 answer
115
8. What are the worst case and average case complexities of a binary search tree?a) O(n), O(n)b) O(logn), O(logn)c) O(logn), O(n)d) O(n), O(logn)
1 votes
1 answer
116
1) How many ways we can traverse 1,2,3,4 in BST?2) How many ways we can insert 1,2,3,4 in BST?______________________________________________________________________How bo...
1 votes
1 answer
118
Consider the following instance of OBST (Optimal Binary Search Tree) Problem.n=4;<a1,a2,a3,a4>=<do,if,int,while>P(1....4)=<3,3,1,1>; Q(0....4)=<2,3,1,1,1>The Cost of OBS...
2 votes
1 answer
119
Number of ways we can insert 5,6,9,10 in the nodes of BST, such that height of BST is either 2 or 3?