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

I forgot my password
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous
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
+1
vote
2
answers
1
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
in
Programming
by
Sona Barman
Active
(
1.1k
points)

53
views
datastructure
binarysearchtree
0
votes
0
answers
2
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
in
Algorithms
by
Na462
Active
(
3.3k
points)

74
views
datastructure
binarysearchtree
0
votes
4
answers
3
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
in
DS
by
Parimal Paritosh
(
171
points)

147
views
binarytree
algorithms
spanningtree
binarysearchtree
+1
vote
1
answer
4
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
in
Algorithms
by
Na462
Active
(
3.3k
points)

98
views
datastructure
binarytree
binarysearchtree
algorithms
+6
votes
1
answer
5
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
in
DS
by
Lakshman Patel RJIT
Loyal
(
7.7k
points)

277
views
datastructure
binarysearchtree
binarytree
+4
votes
1
answer
6
Balanced binary search tree
A balanced binary search tree of n nodes,the number of steps needed to find and remove the 9th largest element in the worst case? (Please mention the algorithm followed)
asked
Jan 15
in
Algorithms
by
VS
Loyal
(
8.7k
points)

134
views
algorithms
datastructure
binarysearchtree
0
votes
1
answer
7
DS BINARY TREE
Consider a binary tree T that has 100 leaf nodes. Then the number of INTERNAL nodes in T that have exactly two children are ______.
asked
Jan 7
in
DS
by
iarnav
Loyal
(
7.2k
points)

160
views
datastructure
binarytree
binarysearchtree
+1
vote
1
answer
8
Self doubt B tree B+tree
To insert key into level L B/B+ tree maximum new nodes require to create?? And how?
asked
Jan 6
in
Databases
by
Anshul Shankar
Active
(
1.1k
points)

59
views
databases
btree
binarysearchtree
0
votes
0
answers
9
Test Series
Can someone explain how to solve such a problem?
asked
Dec 26, 2017
in
DS
by
Kalpataru Bose
(
337
points)

57
views
algorithms
datastructure
binarysearchtree
madeeasytestseries
0
votes
1
answer
10
Programming and Data Structures
asked
Dec 21, 2017
in
DS
by
ashish pal
Active
(
1.1k
points)

107
views
datastructure
binarysearchtree
acetestseries
0
votes
0
answers
11
Test series zeal
Given an initially empty Binary search tree how many different order of insertion order A,B,C,D,E,F,G that returns minimum height tree?
asked
Dec 18, 2017
in
DS
by
Anish Palan
(
11
points)

48
views
binarysearchtree
datastructure
zeal
test
series
+3
votes
2
answers
12
ISRODEC201751
Suppose the numbers $7,5,1,8,3,6,0,9,4,2$ are inserted in that order into an initially empty binary search tree.The binary search tree uses the reversal ordering on natural numbers i.e. $9$ is assumed to be smallest and $0$ is assumed to be largest. The $in$$order$ traversal of the resultant binary search tree ... 7$ $0,1,2,3,4,5,6,7,8,9$ $0,2,4,3,1,6,5,9,8,7$ $9,8,7,6,5,4,3,2,1,0$
asked
Dec 17, 2017
in
DS
by
gatecse
Boss
(
18k
points)

531
views
isrodec2017
binarysearchtree
+1
vote
1
answer
13
ace test
The number of ways we can insert 11, 12, 13, 14, 15, 16, 17 in empty binary search tree such that resulting tree has the height of 6 = ___________ [height of a tree with single node is 0.]
asked
Dec 10, 2017
in
Programming
by
Mr_22B
Active
(
1.1k
points)

75
views
binarysearchtree
permutationsandcombinations
+4
votes
3
answers
14
Number of binary search trees
How many different binary search trees can be constructed using six distinct keys? 256 128 132 264
asked
Nov 27, 2017
in
DS
by
Parshu gate
Active
(
4.9k
points)

387
views
binarytree
binarysearch
binarysearchtree
0
votes
2
answers
15
data strucure
A search was performed on some binary search tree. Which of the following is a valid search sequence? (A) 1, 11, 111, 98, 58, 78, 90, 48, 88 (B) 333, 33, 53, 93, 63, 90, 70, 88 (C) 8, 888, 18, 98, 38, 78, 90, 48, 88 (D) 555, 5, 55, 95, 45, 65, 75, 88
asked
Nov 9, 2017
in
Programming
by
Kaluti
Loyal
(
5.4k
points)

49
views
binary
binarysearchtree
0
votes
2
answers
16
UGCNETNov2017II22
The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree? A. 3 B. 4 C. 5 D. 6
asked
Nov 9, 2017
in
DS
by
Devwritt
Active
(
3k
points)

318
views
ugcnetnov2017ii
datastructure
binarysearchtree
0
votes
1
answer
17
Binary Tree construction
Given the preorder/postorder and inorder traversal of a binary tree, we can always construct a unique binary tree (I think so, correct me if I am wrong) Construct a binary tree with the nodes A, B, C such that its preorder traversal is ABC and its inorder traversal is CAB.
asked
Nov 8, 2017
in
DS
by
humblefool
Junior
(
937
points)

229
views
datastructure
algorithms
bst
binarytree
treetraversal
binarysearchtree
+2
votes
0
answers
18
binary search tree
In a binary search tree ,the key with value 5 was searched after traversing nodes with values 1,3,4,6,7,8,9 not necessarily in that order. Let P is the probability that 3rd element on the search path beginning from the root is either 3 or 8.and N are the number of different order possible in which given nodes can be traversed before finding node with value 5 .Find (N/10)+P
asked
Nov 7, 2017
in
Programming
by
set2018
Loyal
(
7.6k
points)

119
views
binarysearchtree
datastructure
+4
votes
0
answers
19
tifr2010b26 gate2014339
I don't seem to get the difference in both the questions. Finding L (or a) will take O(log n) comparisons which is fine. But now to search all elements between L and H (or a and b), weather it will take O(log n) time or constant time ? In the ... question, it is unclear. So how much time does it take ro search all elements between L and H (or a and b). ? Kindly explain.
asked
Oct 26, 2017
in
DS
by
rishi71662data4
Active
(
2.3k
points)

109
views
binarysearchtree
datastructure
+1
vote
2
answers
20
Why given C code of Binary Search Tree is errorneous.
asked
Aug 23, 2017
in
Programming
by
Aghori
Loyal
(
6k
points)

131
views
binarysearchtree
programminginc
datastructure
0
votes
1
answer
21
BST doubt
if the value is less the root then it will goto left subtree & if the value is greater than root then it will go right. 1)what we do if value = root??(for multiple time same values) 2) duplicate values are allowed??
asked
Aug 21, 2017
in
DS
by
Hira Thakur
Boss
(
12.6k
points)

51
views
binarysearchtree
+1
vote
2
answers
22
traversal
how to make binary search tree from the given post order traversal 1,2,3,4................n if no inorder or preorder is mentioned?????????//
asked
Jul 10, 2017
in
Algorithms
by
akankshadewangan24
Active
(
3.9k
points)

59
views
binarysearchtree
+4
votes
1
answer
23
Difference between finding Inorder Successor vs finding next using Inorder Traversal in BST
asked
Jun 25, 2017
in
Algorithms
by
rahulsangwn
(
325
points)

293
views
algorithms
binarytree
binarysearch
binarysearchtree
+6
votes
3
answers
24
binary search
I/p  array of n element in which untill some postion all are integer and afterward all are star (*) O/p find the postion of 1st star (*) Hint  if lenear search is possible the go to BS Find time complexity ..?
asked
Mar 9, 2017
in
Algorithms
by
air1ankit
Active
(
3.3k
points)

516
views
algorithms
binarysearch
binarysearchtree
+15
votes
6
answers
25
GATE2017236
The preorder traversal of a binary search tree is given by $12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20$. Then the postorder traversal of this tree is $2, 6, 7, 8, 9, 10, 12, 15, 16, 17, 19, 20$ $2, 7, 6, 10, 9, 8, 15, 17, 20, 19, 16, 12$ $7, 2, 6, 8, 9, 10, 20, 17, 19, 15, 16, 12$ $7, 6, 2, 10, 9, 8, 15, 16, 17, 20, 19, 12$
asked
Feb 14, 2017
in
DS
by
Arjun
Veteran
(
348k
points)

2k
views
gate20172
datastructure
binarysearchtree
+18
votes
8
answers
26
GATE201716
Let $T$ be a binary search tree with 15 nodes. The minimum and maximum possible heights of $T$ are: Note: The height of a tree with a single node is $0$. $4$ and $15$ respectively. $3$ and $14$ respectively. $4$ and $14$ respectively. $3$ and $15$ respectively.
asked
Feb 14, 2017
in
DS
by
Arjun
Veteran
(
348k
points)

2.8k
views
gate20171
datastructure
binarysearchtree
easy
+1
vote
1
answer
27
Time complexity to compute the sum of k smallest element in the binary search tree??
asked
Feb 2, 2017
in
Programming
by
sushmita
Boss
(
13.4k
points)

519
views
binarysearch
binarysearchtree
0
votes
1
answer
28
Binary Tree
asked
Jan 30, 2017
in
DS
by
monty
Active
(
1k
points)

57
views
datastructure
binarysearchtree
Page:
1
2
3
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
IIIT Hyderabad Interview Experience
The GATE journey
BARC Interview Experience 15th June 2018
COAP Admission and IITD, IITK Interview Experience 2018
MS Interview Experience at IITK
Follow @csegate
Gatecse
Recent questions tagged binarysearchtree
Recent Blog Comments
Congratulations Priyendu, thanks for sharing the ...
Most probably IITK. Analyzed a lot and finally ...
Congratulations! Which college are you aiming for ...
yes. I'm joining bits goa. I'm from goa also so ...
You did this in final year or with job?
36,132
questions
43,578
answers
123,851
comments
42,816
users