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
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
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
in
DS
by
Lakshman Patel RJIT
Boss
(
19.5k
points)

51
views
datastructure
binarysearchtree
+1
vote
0
answers
2
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
in
Programming
by
mitesh kumar
(
271
points)

157
views
datastructure
binarysearchtree
testseries
0
votes
0
answers
3
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
in
DS
by
Lakshman Patel RJIT
Boss
(
19.5k
points)

44
views
datastructure
binarysearchtree
0
votes
0
answers
4
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
in
Programming
by
Na462
Loyal
(
7.4k
points)

49
views
datastructure
binarytree
binarysearchtree
0
votes
1
answer
5
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
(
191
points)

33
views
recurrence
relation
binarysearchtree
0
votes
2
answers
6
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
(
919
points)

52
views
binarysearchtree
binarytree
datastructure
0
votes
1
answer
7
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
(
919
points)

53
views
datastructure
binarysearchtree
bst
binarytree
algorithms
+1
vote
1
answer
8
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
(
103k
points)

68
views
datastructure
binarysearchtree
bst
+2
votes
1
answer
9
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
(
103k
points)

145
views
datastructure
bst
binarysearchtree
0
votes
1
answer
10
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
(
103k
points)

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

83
views
binarytree
binarysearchtree
treetraversal
0
votes
2
answers
12
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
(
5.1k
points)

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

82
views
binarysearchtree
treetraversal
bst
0
votes
1
answer
14
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
(
103k
points)

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

117
views
datastructure
binarysearchtree
0
votes
0
answers
16
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
(
7.4k
points)

89
views
datastructure
binarysearchtree
0
votes
4
answers
17
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
(
265
points)

196
views
binarytree
algorithms
spanningtree
binarysearchtree
+1
vote
1
answer
18
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
(
7.4k
points)

113
views
datastructure
binarytree
binarysearchtree
algorithms
+8
votes
1
answer
19
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
Boss
(
19.5k
points)

359
views
datastructure
binarysearchtree
binarytree
+4
votes
1
answer
20
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.5k
points)

154
views
algorithms
datastructure
binarysearchtree
0
votes
1
answer
21
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
(
9.3k
points)

177
views
datastructure
binarytree
binarysearchtree
+1
vote
1
answer
22
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.2k
points)

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

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

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

152
views
binarysearchtree
datastructure
zeal
test
series
+3
votes
2
answers
26
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 ... $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.3k
points)

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

84
views
binarysearchtree
permutationsandcombinations
+4
votes
3
answers
28
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)

515
views
binarytree
binarysearch
binarysearchtree
0
votes
2
answers
29
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)

53
views
binary
binarysearchtree
0
votes
2
answers
30
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.9k
points)

540
views
ugcnetnov2017ii
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
IIT HYDERABAD M.Tech (RA) 3Years Winter Session Interview experience
INDIAN AIR FORCE
GATE BOOK _ TEST SERIES DOUBT_
Visualizing complex C code
GATE Book Test Series
Follow @csegate
Gatecse
Recent questions tagged binarysearchtree
Recent Blog Comments
There is one more problem. Ppl who have...
CL013924707IN rt?
I ordered the GO BOOK 6 dec ....but still i didnt...
thankyou sir
44,240
questions
49,724
answers
163,937
comments
65,839
users