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
0
votes
1
answer
1
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
in
DS
by
K ANKITH KUMAR
(
173
points)

26
views
recurrence
relation
binarysearchtree
0
votes
2
answers
2
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
in
Programming
by
pradeepchaudhary
Junior
(
603
points)

38
views
binarysearchtree
binarytree
datastructure
0
votes
1
answer
3
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
in
Programming
by
pradeepchaudhary
Junior
(
603
points)

38
views
datastructure
binarysearchtree
bst
binarytree
algorithms
+1
vote
1
answer
4
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
in
DS
by
srestha
Veteran
(
98.3k
points)

55
views
datastructure
binarysearchtree
bst
+2
votes
1
answer
5
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
in
DS
by
srestha
Veteran
(
98.3k
points)

131
views
datastructure
bst
binarysearchtree
0
votes
1
answer
6
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
in
DS
by
srestha
Veteran
(
98.3k
points)

50
views
datastructure
binarytree
binarysearchtree
+2
votes
2
answers
7
self doutbt
How to Construct Full Binary Tree from given preorder and postorder? Thank you.
asked
Jul 16
in
DS
by
Vegeta
(
353
points)

59
views
binarytree
binarysearchtree
treetraversal
0
votes
2
answers
8
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
in
Others
by
Pooja Khatri
Active
(
4.3k
points)

29
views
ugcnetjuly2018ii
datastructure
binarysearchtree
0
votes
2
answers
9
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
in
Study Resources
by
amber12
(
47
points)

56
views
binarysearchtree
treetraversal
bst
0
votes
1
answer
10
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
in
Algorithms
by
srestha
Veteran
(
98.3k
points)

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

99
views
datastructure
binarysearchtree
0
votes
0
answers
12
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
Loyal
(
6.4k
points)

80
views
datastructure
binarysearchtree
0
votes
4
answers
13
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
(
255
points)

183
views
binarytree
algorithms
spanningtree
binarysearchtree
+1
vote
1
answer
14
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
Loyal
(
6.4k
points)

111
views
datastructure
binarytree
binarysearchtree
algorithms
+6
votes
1
answer
15
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
(
9.5k
points)

323
views
datastructure
binarysearchtree
binarytree
+4
votes
1
answer
16
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
(
9.1k
points)

147
views
algorithms
datastructure
binarysearchtree
0
votes
1
answer
17
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
(
8.6k
points)

174
views
datastructure
binarytree
binarysearchtree
+1
vote
1
answer
18
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)

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

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

125
views
datastructure
binarysearchtree
acetestseries
0
votes
1
answer
21
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)

88
views
binarysearchtree
datastructure
zeal
test
series
+3
votes
2
answers
22
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
(
18.2k
points)

568
views
isrodec2017
binarysearchtree
+1
vote
1
answer
23
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)

81
views
binarysearchtree
permutationsandcombinations
+4
votes
3
answers
24
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
(
5k
points)

466
views
binarytree
binarysearch
binarysearchtree
0
votes
2
answers
25
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.9k
points)

50
views
binary
binarysearchtree
0
votes
2
answers
26
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
(
3.2k
points)

483
views
ugcnetnov2017ii
datastructure
binarysearchtree
0
votes
1
answer
27
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
(
947
points)

278
views
datastructure
algorithms
bst
binarytree
treetraversal
binarysearchtree
+2
votes
0
answers
28
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
(
8k
points)

135
views
binarysearchtree
datastructure
+4
votes
0
answers
29
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)

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

137
views
binarysearchtree
programminginc
datastructure
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
List of Available Exams
New Assignment on Network programming : P2P simulation
Theory of Computation  GO Classroom
Probability  GO Classroom
Daily Quiz
Follow @csegate
Gatecse
Recent questions tagged binarysearchtree
Recent Blog Comments
@sahil you can see my response sheet...
How many tests will be uploaded before gate 19?
@IITDELHIVISHAL Yes, it will work. Make your...
sir if watch& making notes from quality videos...
yes! those will be available on GO,no need to pay
40,845
questions
47,507
answers
145,768
comments
62,262
users