The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
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
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Recent questions tagged binarysearchtree
0
votes
1
answer
1
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
in
Algorithms
by
s_dr_13
(
91
points)

39
views
bst
binarysearchtree
tree
datastructure
0
votes
1
answer
2
GATEBOOK2019 Mock Test153
Suppose that six keys are inserted into an unbalanced binary search tree in the following order: $4, 6, 3, 8, 2,5$ Which of the following statements is/are TRUE? Finding a key in the resulting tree requires examining $1, 2$ or $3$ nodes. The resulting ... be inserted without adding another level to the tree. I and II only I and III only II and III only I, II, and III
asked
Jan 19
in
DS
by
GATEBOOK
Boss
(
15.3k
points)

71
views
gb2019mock1
binarysearchtree
+2
votes
1
answer
3
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
in
DS
by
sripo
Active
(
1.5k
points)

108
views
algorithms
graphtheory
binarysearchtree
binarysearch
binarytree
trees
datastructure
0
votes
0
answers
4
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
in
DS
by
Rishav Chetan
(
41
points)

59
views
binarysearchtree
0
votes
0
answers
5
Binary serach tree
Can binary serach tree have duplicate elements in the tree?
asked
Jan 12
in
Programming
by
akankshadewangan24
Active
(
4.3k
points)

27
views
binarysearchtree
0
votes
0
answers
6
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
in
DS
by
Gupta731
Active
(
4.5k
points)

75
views
madeeasytestseries
datastructure
binarysearchtree
0
votes
0
answers
7
MadeEasy Test Series: Programming & DS  Binary Search Tree
asked
Jan 2
in
Programming
by
CHïntän ÞäTël
(
275
points)

45
views
madeeasytestseries
#data
structures
binarysearchtree
0
votes
0
answers
8
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
in
Programming
by
Ashwani Yadav
Active
(
1.1k
points)

44
views
binarysearchtree
0
votes
0
answers
9
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
(
6.4k
points)

45
views
datastructure
binarysearchtree
0
votes
1
answer
10
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.5k
points)

62
views
datastructure
binarysearchtree
0
votes
1
answer
11
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
Boss
(
29.4k
points)

54
views
datastructure
binarysearchtree
+1
vote
0
answers
12
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
(
327
points)

167
views
datastructure
binarysearchtree
testseries
0
votes
0
answers
13
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
Boss
(
29.4k
points)

50
views
datastructure
binarysearchtree
0
votes
0
answers
14
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
(
8.7k
points)

66
views
datastructure
binarytree
binarysearchtree
0
votes
0
answers
15
Testbook Test Series: Programming & DS  Binary Search Trees
asked
Sep 1, 2018
in
DS
by
sidlewis
Junior
(
779
points)

173
views
testbooktestseries
datastructure
binarysearchtree
0
votes
1
answer
16
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
(
209
points)

74
views
recurrence
relation
binarysearchtree
0
votes
2
answers
17
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.1k
points)

59
views
binarysearchtree
binarytree
datastructure
0
votes
1
answer
18
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.1k
points)

77
views
datastructure
binarysearchtree
bst
binarytree
algorithms
+1
vote
1
answer
19
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
(
108k
points)

80
views
datastructure
binarysearchtree
bst
+2
votes
1
answer
20
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
(
108k
points)

171
views
datastructure
bst
binarysearchtree
0
votes
1
answer
21
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
(
108k
points)

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

127
views
binarytree
binarysearchtree
treetraversal
0
votes
2
answers
23
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
Loyal
(
8.8k
points)

278
views
ugcnetjuly2018ii
datastructure
binarysearchtree
0
votes
2
answers
24
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
(
47
points)

133
views
binarysearchtree
treetraversal
bst
0
votes
1
answer
25
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
(
108k
points)

64
views
binarytree
binarysearchtree
algorithms
+1
vote
2
answers
26
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.3k
points)

148
views
datastructure
binarysearchtree
0
votes
0
answers
27
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
(
8.7k
points)

98
views
datastructure
binarysearchtree
0
votes
4
answers
28
trees
Given a preorder, postorder and inorder traversal of a tree, is it always possible to obtain a tree that satisfies each of the three conditions? Or is it possible to not obtain a tree at all?
asked
Feb 19, 2018
in
DS
by
Parimal Paritosh
(
293
points)

213
views
binarytree
algorithms
spanningtree
binarysearchtree
+1
vote
1
answer
29
Binary Tree
I have doubt when its asked to know number of labelled and unlabelled binary tree : For labelled = (On basis of labelling) T(n) = 2nCn/(n+1) * n! For unlabelled = (On Basis of Geometric Sturucture) T(n) = (2n)Cn/n+1 Right? What if its Asked for BST what will be the answer in both the above cases and Why?
asked
Feb 17, 2018
in
Algorithms
by
Na462
Loyal
(
8.7k
points)

125
views
datastructure
binarytree
binarysearchtree
algorithms
+8
votes
1
answer
30
Binary Search Tree
Q1. How many binary search trees possible with $11$ distinct key? Q2. How many binary search trees possible with $11$ unlabelled nodes? Q3. How many binary search trees possible with $11$ labelled nodes? Q4. How many binary trees possible with $11$ ... Q5. How many binary trees possible with $11$ unlabelled nodes? Q6. How many binary trees possible with $11$ labelled nodes?
asked
Feb 2, 2018
in
DS
by
Lakshman Patel RJIT
Boss
(
29.4k
points)

411
views
datastructure
binarysearchtree
binarytree
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
GATE 2019 My reasoned routine. (AIR 558)
if i can you also can
M.S admissions help
Thank you #GO
GATE CSE 2019 Admissions Part 2  Score Change, COAP and Internal Sliding
Follow @csegate
Recent questions tagged binarysearchtree
Recent Blog Comments
Hey!! I have got the same rank in Gate this year...
Thanks for the list.
Great post brother....congrats....very well...
COAP registration will start from...
In IIT Delhi application, what to be filled in...
48,447
questions
52,747
answers
183,345
comments
68,219
users