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
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
(
141
points)

102
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
(
11.4k
points)

77
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
(
2.3k
points)

343
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
(
35
points)

69
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
(
3.9k
points)

32
views
binarysearchtree
0
votes
1
answer
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.6k
points)

114
views
madeeasytestseries
datastructure
binarysearchtree
+1
vote
1
answer
7
GATEBOOK2019 Grand Test DS&A8
The time required to check whether given tree is binary search tree or not in the worst case is $\Theta(n)$ $\Theta(n\log n)$ $\Theta(\log n)$ $\Theta(n^2)$
asked
Jan 6
in
Algorithms
by
GATEBOOK
Boss
(
11.4k
points)

92
views
gb2019gtdsa
binarysearchtree
0
votes
0
answers
8
MadeEasy Test Series: Programming & DS  Binary Search Tree
asked
Jan 2
in
Programming
by
CHïntän ÞäTël
(
211
points)

69
views
madeeasytestseries
avltree
binarysearchtree
0
votes
0
answers
9
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.2k
points)

55
views
binarysearchtree
0
votes
0
answers
10
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.9k
points)

53
views
datastructure
binarysearchtree
0
votes
1
answer
11
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.6k
points)

72
views
datastructure
binarysearchtree
0
votes
1
answer
12
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
(
46.5k
points)

62
views
datastructure
binarysearchtree
+1
vote
0
answers
13
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
(
315
points)

199
views
datastructure
binarysearchtree
testseries
0
votes
0
answers
14
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
(
46.5k
points)

54
views
datastructure
binarysearchtree
0
votes
0
answers
15
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
(
6.7k
points)

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

192
views
testbooktestseries
datastructure
binarysearchtree
0
votes
1
answer
17
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
(
191
points)

246
views
recurrence
relation
binarysearchtree
0
votes
2
answers
18
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)

84
views
binarysearchtree
binarytree
datastructure
0
votes
1
answer
19
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)

104
views
datastructure
binarysearchtree
bst
binarytree
algorithms
+1
vote
1
answer
20
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
(
114k
points)

94
views
datastructure
binarysearchtree
bst
+2
votes
1
answer
21
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
(
114k
points)

191
views
datastructure
bst
binarysearchtree
0
votes
1
answer
22
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
(
114k
points)

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

162
views
binarytree
binarysearchtree
treetraversal
0
votes
3
answers
24
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.8k
points)

681
views
ugcnetjuly2018ii
datastructure
binarysearchtree
0
votes
2
answers
25
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)

207
views
binarysearchtree
treetraversal
bst
0
votes
1
answer
26
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
(
114k
points)

67
views
binarytree
binarysearchtree
algorithms
+1
vote
2
answers
27
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)

207
views
datastructure
binarysearchtree
0
votes
0
answers
28
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
(
6.7k
points)

107
views
datastructure
binarysearchtree
0
votes
4
answers
29
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
(
213
points)

235
views
binarytree
algorithms
spanningtree
binarysearchtree
+1
vote
1
answer
30
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
(
6.7k
points)

133
views
datastructure
binarytree
binarysearchtree
algorithms
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 2020 Application Form Opened!
My GATE Preparation Journey
ISI MTECH CS 2019 INTERVIEW EXPERIENCE
IIT HYDERABAD MTECH TA INTERVIEW EXPERIENCE
How to prepare for GATE with a fulltime job??
Follow @csegate
Recent questions tagged binarysearchtree
Recent Blog Comments
will pdfs be uploaded ?
6th...
Sir
4th...
49,984
questions
55,138
answers
190,497
comments
85,163
users