The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
Recent questions tagged binarysearchtree
+1
vote
2
answers
1
ISRO202019
What is the inorder successor of $15$ in the given binary search tree? $18$ $6$ $17$ $20$
asked
Jan 13
in
DS
by
Satbir
Boss
(
24.2k
points)

85
views
isro2020
datastructures
binarysearchtree
easy
+1
vote
0
answers
2
Cormen Edition 3 Exercise 12.1 Question 5 (Page No. 289)
Argue that since sorting $n$ elements takes $\Omega (n\ lgn)$ time in the worst case in the comparison model, any comparisonbased algorithm for constructing a $BST$ from an arbitrary list of n elements takes $\Omega (n\ lgn)$ time in the worst case.
asked
Nov 20, 2019
in
Algorithms
by
Kushagra गुप्ता
Active
(
4.5k
points)

170
views
cormen
algorithms
descriptive
binarysearchtree
binarytree
trees
+4
votes
2
answers
3
CMI2019A3
Suppose that the figure to the right is a binary search tree. The letters indicate the names of the nodes, not the values that are stored. What is the predecessor node, in terms of value, of the root node $A?$ $D$ $H$ $I$ $M$
asked
Sep 13, 2019
in
DS
by
gatecse
Boss
(
17.5k
points)

152
views
cmi2019
datastructures
trees
binarysearchtree
0
votes
1
answer
4
Internal Path Length of BST
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
by
s_dr_13
(
299
points)

137
views
bst
binarysearchtree
tree
datastructures
+2
votes
1
answer
5
How many Binary Search Trees are possible for a labelled nodes?
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 possible is just 1?
asked
Jan 16, 2019
in
DS
by
sripo
Active
(
2.5k
points)

547
views
algorithms
graphtheory
binarysearchtree
binarysearch
binarytree
trees
datastructures
0
votes
0
answers
6
Testbook.com Test Series
When searching for the key value 50 in a binary search tree, nodes containing the key values 10,15,20,30,60,80,89,90 are traversed, not necessarily in the given order. How many different orders are possible in which these key values can occur on the search path from the root to the node containing the value 50?
asked
Jan 16, 2019
in
DS
by
Rishav Chetan
(
45
points)

76
views
binarysearchtree
0
votes
0
answers
7
Binary serach tree
Can binary serach tree have duplicate elements in the tree?
asked
Jan 12, 2019
in
Programming
by
akankshadewangan24
Active
(
4k
points)

38
views
binarysearchtree
0
votes
1
answer
8
MadeEasy Test Series: Programming & DS  Binary Search Tree
AVL tree is created by inserting the keys 2, 6, 1, 5, 3, 4, 7 in the given order (Assume the tree is initially empty). Then the level order traversals of the tree would be. 2, 1, 3, 5, 4, 6, 7 3, 2, 5, 1 ... . After 2 or 3 rotations I get stuck trying to figure out which way to rotate. Please help me with the proper steps in this question.
asked
Jan 6, 2019
in
DS
by
Gupta731
Active
(
4.8k
points)

131
views
madeeasytestseries
datastructures
binarysearchtree
0
votes
0
answers
9
MadeEasy Test Series: Programming & DS  Binary Search Tree
asked
Jan 2, 2019
in
Programming
by
CHïntän ÞäTël
(
217
points)

88
views
madeeasytestseries
avltree
binarysearchtree
0
votes
1
answer
10
Binary search trees
the number of binary search trees with 4 nodes (1 , 2 , 3 , 4) where 1 is always a leaf node?
asked
Jan 1, 2019
in
Programming
by
Ashwani Yadav
Active
(
1.2k
points)

74
views
binarysearchtree
0
votes
0
answers
11
GO MOCK2 Doubt
Consider the following possible data structures for a set of n distinct integers. A minheap An array of length sorted in increasing order A balanced binary search tree For which of these data structures, the number of steps needed to find and remove the 9th largest element in 0(logn) time in the worst case? I and III II and III I and II II only
asked
Dec 21, 2018
in
DS
by
jatin khachane 1
Loyal
(
7.5k
points)

59
views
datastructures
binarysearchtree
0
votes
1
answer
12
Gateforum Class Notes
Suppose we have a BST and we run a program on the BST with n leaf nodes and compute the value of a function $g(x)$ for each node in BST. If the cost of computing $g(x)$ is minimum of number of leaf node in left subtree and number of leaf node in right subtree. The worst case time complexity of the program is: $O(n)$ $O(nlog_2n)$ $O(n^2)^2$ $O(n^2log_2n)$
asked
Dec 18, 2018
in
DS
by
Gupta731
Active
(
4.8k
points)

84
views
datastructures
binarysearchtree
0
votes
1
answer
13
Binary Search Tree
Consider the following routine bool do(struct node *root) { if(!root) return true; else if(( root > left != NULL && root > data < root > left> data) (root>right != NULL && root > data > root > ... > right)); } What does they do() check whether a given tree is: $A)$ Max heap $B)$ Min Heap $C)$BST $D)$ Binary Tree
asked
Nov 6, 2018
in
DS
by
Lakshman Patel RJIT
Veteran
(
59.3k
points)

67
views
datastructures
binarysearchtree
+1
vote
0
answers
14
test series
Consider an empty binary search tree of height $1.$We need to fill the following sequence of numbers in it $: 11, 12, 13, 14, 15, 16, 17.$The number of ways in which the numbers can be inserted in an empty binary search tree, such that the resulting tree has height $6,$ is _____________ $A)2$ $B)4$ $C)32$ $D)64$
asked
Oct 28, 2018
in
Programming
by
mitesh kumar
Junior
(
605
points)

214
views
datastructures
binarysearchtree
testseries
0
votes
0
answers
15
Binary Search Tree
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'.$
asked
Oct 28, 2018
in
DS
by
Lakshman Patel RJIT
Veteran
(
59.3k
points)

59
views
datastructures
binarysearchtree
0
votes
0
answers
16
Labelled Binary Tree
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 ........
asked
Oct 20, 2018
in
Programming
by
Na462
Loyal
(
7k
points)

105
views
datastructures
binarytree
binarysearchtree
+1
vote
1
answer
17
ISI2016PCBCS1
Consider the array $A=[20,13,19,8,3,5,4]$ that represents a heap. Draw the heap after removing the element $20.$ List all the distinct integer keys $k$ such that, when $k$ is inserted in the Binary Search Tree of Figure $1,$ its height increases. Note that you are not allowed to insert an already existing key again. Justify your answer.
asked
Sep 18, 2018
in
DS
by
jothee
Veteran
(
105k
points)

44
views
isi2016pcbcs
trees
binarysearchtree
descriptive
0
votes
0
answers
18
Testbook Test Series: Programming & DS  Binary Search Trees
asked
Sep 1, 2018
in
DS
by
sidlewis
Junior
(
923
points)

200
views
testbooktestseries
datastructures
binarysearchtree
0
votes
1
answer
19
Recurrence Relation of BST
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) + 2 2) T(n) = T(n/2) + 1
asked
Aug 29, 2018
in
DS
by
K ANKITH KUMAR
(
207
points)

288
views
recurrence
relation
binarysearchtree
0
votes
2
answers
20
Binary Tree Array Implementation
What must be the ideal size of array if the height of tree is ‘l’? a) 2l1 b) l1 c) l d) 2l
asked
Aug 19, 2018
in
Programming
by
pradeepchaudhary
Active
(
1.2k
points)

97
views
binarysearchtree
binarytree
datastructures
0
votes
1
answer
21
Binary Search Tree
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)
asked
Aug 19, 2018
in
Programming
by
pradeepchaudhary
Active
(
1.2k
points)

123
views
datastructures
binarysearchtree
bst
binarytree
algorithms
+1
vote
1
answer
22
Binary Search Tree
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 both are different in calculation of BST?Why they are use different formula?
asked
Aug 18, 2018
in
DS
by
srestha
Veteran
(
119k
points)

107
views
datastructures
binarysearchtree
bst
+2
votes
1
answer
23
Binary Search Tree
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?
asked
Aug 17, 2018
in
DS
by
srestha
Veteran
(
119k
points)

212
views
datastructures
bst
binarysearchtree
0
votes
1
answer
24
Program of Binary Tree
Why not this code not printing 10? (It is just a binary tree with one node i.e. root. And value of root is 10) #include <stdio.h> #include<stdlib.h> struct BinaryTree *root=NULL; struct BinaryTree{ int data; struct BinaryTree *left; struct BinaryTree * ... root=node(data1); return root; } } int main() { insert(root,10); printf("%d",*root); return 0; }
asked
Aug 14, 2018
in
DS
by
srestha
Veteran
(
119k
points)

79
views
datastructures
binarytree
binarysearchtree
+2
votes
2
answers
25
self doutbt
How to Construct Full Binary Tree from given preorder and postorder? Thank you.
asked
Jul 16, 2018
in
DS
by
Vegeta
Junior
(
931
points)

184
views
binarytree
binarysearchtree
treetraversal
0
votes
3
answers
26
UGCNETJuly2018II26
A binary search tree in which every nonleaf node has nonempty left and right subtrees is called a strictly binary tree. Such a tree with 19 leaves: cannot have more than 37 nodes has exactly 37 nodes has exactly 35 nodes cannot have more than 35 nodes
asked
Jul 13, 2018
in
Others
by
Pooja Khatri
Boss
(
10.9k
points)

807
views
ugcnetjuly2018ii
datastructures
binarysearchtree
0
votes
2
answers
27
Binary search tree preorder
someone please explain this question A binary search tree contains the values 1, 2, 3, 4, 5, 6, 7, 8. The tree is traversed in preorder and the values are printed out. Which of the following sequences is a valid output? how the option D is correct? A 53124786 B 53126487 C 53241678 D 53124768
asked
Jul 5, 2018
in
Study Resources
by
amber12
(
41
points)

239
views
binarysearchtree
treetraversal
bst
0
votes
1
answer
28
Binary Tree
Can a binary tree or BST can be constructed with dynamic programming? Can it be constructed through greedy method? Plz give some algorithm and explain
asked
Jun 30, 2018
in
Algorithms
by
srestha
Veteran
(
119k
points)

71
views
binarytree
binarysearchtree
algorithms
+1
vote
2
answers
29
Gradup topicwise question
Consider the vales of bst $11,22,33,44,55,66,77,88$. Which of the following is a valid sequence of preorder traversal? $55,33,11,22,44,77,66,88$ $55,33,22,44,11,66,77,88$ $55,33,11,44,22,66,77,88$ $55,33,11,44,22,66,77,88$ Given answer is option A But how?
asked
May 22, 2018
in
Programming
by
Sona Barman
Active
(
1.2k
points)

270
views
datastructures
binarysearchtree
0
votes
0
answers
30
Balanced tree vs Complete binary tree
1. Please Verify this: Assuming pointer to node which need to be deleted given Balanced Binary Tree insertion = O(logn), deletion= O(logn) Complete Tree insertion = O(1), deletion= O(1) Assuming pointer to node which need to be deleted not given ... better than a complete binary tree for sorting a set S of n elements . Is it true if it is then reason please ?
asked
May 6, 2018
in
Algorithms
by
Na462
Loyal
(
7k
points)

109
views
datastructures
binarysearchtree
Page:
1
2
3
4
next »
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
ISRO CSE 2020 PAPER ANALYSE
BARC OCES/DGFS 2020
ISI CMI PDF by GATE Overflow
Calculus Important Points
Management Trainee Recruitment COAL INDIA 2020
Follow @csegate
Recent questions tagged binarysearchtree
Recent Blog Comments
Has anyone else challenged the questions on...
@nkg_master9  For getting selected for the...
Nowhere it's mentioned.
@bond  Is it mentioned that you have to score at...
I think cutoff won't cross 85
50,737
questions
57,385
answers
198,549
comments
105,365
users