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
1
answer
1
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
in
DS
by
gatecse
Boss
(
16.6k
points)

37
views
cmi2019
datastructure
trees
binarysearchtree
0
votes
1
answer
2
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
(
167
points)

118
views
bst
binarysearchtree
tree
datastructure
+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.4k
points)

405
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)

70
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)

33
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.7k
points)

121
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
(
217
points)

74
views
madeeasytestseries
avltree
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.2k
points)

60
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
(
7.2k
points)

57
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.7k
points)

75
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
Veteran
(
53.4k
points)

65
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
(
369
points)

202
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
Veteran
(
53.4k
points)

57
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
(
6.8k
points)

98
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
(
887
points)

196
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
(
191
points)

253
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.2k
points)

90
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.2k
points)

111
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
(
117k
points)

97
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
(
117k
points)

198
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
(
117k
points)

70
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
(
835
points)

170
views
binarytree
binarysearchtree
treetraversal
0
votes
3
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
Boss
(
10.8k
points)

764
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
(
41
points)

217
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
(
117k
points)

70
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.2k
points)

236
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
(
6.8k
points)

108
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
(
213
points)

242
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
(
6.8k
points)

137
views
datastructure
binarytree
binarysearchtree
algorithms
+1
vote
1
answer
30
CMI2017A09
Suppose we constructed the binary search tree shown below by starting with an empty tree and inserting one element at a time from an input sequence, without any rotations or other manipulations. Which of the following assertions about the order of elements in the input sequence $cannot$ be ... came after $12$ and $29$ came before $42$. $3$ came before $14$ and $16$ came before $28$.
asked
Feb 5, 2018
in
DS
by
Tesla!
Boss
(
18.2k
points)

110
views
cmi2017
datastructure
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
OFFICIAL GATE MOCK TEST RELEASED
IIITH: Winter Research Admissions 2019 (For Spring 2020)
TIFR and JEST exam
Minimal Deterministic Finite Automata
To be aware of fake GATE test series
Follow @csegate
Recent questions tagged binarysearchtree
Recent Blog Comments
still it's usefull for practice purpose and...
@Satbir Its a valuable info..Thanks
It is the 2019 question paper given as a mock...
Favorite is not working for blogs.. In favorites...
Favourite option does work. But list options...
50,650
questions
56,185
answers
193,939
comments
94,694
users