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 binarytree
0
votes
2
answers
1
ACE TEST SERIES QUESTION
asked
Jun 6
in
DS
by
Shankar Kakde
(
51
points)

118
views
acetestseries
binarytree
0
votes
2
answers
2
DATA STRUCTURES
What is the difference between full binary tree ,almost complete binary tree and complete binary tree? explain by drawing trees
asked
May 29
in
DS
by
kamakshi
Junior
(
537
points)

95
views
datastructure
binarytree
0
votes
2
answers
3
Binary Tree
$\text{Given preorder and inorder, how many binary trees are possible?}$
asked
May 26
in
DS
by
sanny_1
(
37
points)

97
views
datastructure
binarytree
0
votes
1
answer
4
Binary Tree
How to generate post order array from given in order array [8,6,9,4,7,2,5] ?
asked
May 14
in
Programming
by
raman.pndy
(
19
points)

33
views
binarytree
datastructure
0
votes
0
answers
5
Finding diameter of Binary Tree
How do we find the diameter of a Binary tree? I have come to below algorithm. Please let me know if it works (1)Use BFS on root's left subtree to find the last processed node say node1. (2)Use BFS on root's right subtree to ... from node1 as source and we keep counting the number of nodes that appear before our node2 appears. This count will give us the diameter.
asked
May 10
in
Programming
by
Ayush Upadhyaya
Loyal
(
9k
points)

41
views
binarytree
datastructure
0
votes
1
answer
6
Complete binary tree
If I have a complete binary tree and I need to find the average number of comparison to find any random key. Can I use this strategy like : We can keep track of number of nodes per level and apply: Summation (Level * number of nodes at that level) / total ... . Here summation is Sigma. And here I will consider level of root = 0 or 1 ? Well defaUlt we tAke as 0 but still...
asked
Apr 25
in
Programming
by
Na462
Active
(
3.3k
points)

54
views
datastructure
binarytree
+1
vote
0
answers
7
Counting No of Trees  College Exam
Want help with part (a). Other parts can be done accordingly. According to the solution, I understand how to find the limits of the sum, but why is there a factor of 2 with T(k) * T(nk1), according to my understanding it should not be there ... ) is the count of right subtrees, so there are only T(k)*T(nk1) possibilities for each k, sum over the limits
asked
Mar 25
in
Algorithms
by
Yash Khanna
(
261
points)

51
views
binarytree
algorithms
dynamicprogramming
permutationsandcombinations
+4
votes
1
answer
8
Binary Tree
What is the number of binary trees with 4 nodes which when traversed in preorder gives the sequence 1,2,3,4?
asked
Mar 22
in
DS
by
srestha
Veteran
(
86.9k
points)

162
views
datastructure
binarytree
+1
vote
0
answers
9
GATE199716
In this GATE ques Part a) For Size balanced tree the recurrence (max height) is T(h)=T(h1) +T(h2) +1, solving which we get T(0)=1, T(1)=2,T(2)=1+2+1=4, T(3)=4+2+1=7 Here, T(0),T(1),T(2) are of the form 2h but T(3) is not equal to 23 then how can we claim that "sizebalance binary tree of height 'h' contain at least 2h nodes." ?
asked
Mar 14
in
DS
by
Mamta Satywali
Active
(
2.2k
points)

142
views
gate1997
datastructure
binarytree
0
votes
4
answers
10
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)

149
views
binarytree
algorithms
spanningtree
binarysearchtree
+1
vote
1
answer
11
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)

99
views
datastructure
binarytree
binarysearchtree
algorithms
+7
votes
4
answers
12
GATE201820
The postorder traversal of a binary tree is 8, 9, 6, 7, 4, 5, 2, 3, 1. The inorder traversal of the same tree is 8, 6, 9, 4, 7, 2, 5, 1, 3. The height of a tree is the length of the longest path from the root to any leaf. The height of the binary tree above is _____
asked
Feb 14
in
DS
by
gatecse
Boss
(
18k
points)

1.4k
views
gate2018
datastructure
binarytree
numericalanswers
+6
votes
1
answer
13
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)

278
views
datastructure
binarysearchtree
binarytree
+2
votes
0
answers
14
MultiSubject (CO, DIgital, DS)
A 4bit modulo16 ripple counter uses JK flipflops. If the propagation delay of each FF is 100 ns, the maximum clock frequency that can be used is equal to: Ans 2.5MHz. I think it should be $\frac{1}{16*10^{7}} = 0.625MHz$ ... minimum number of comparisons that will be needed in the worst case by the optimal algorithm for doing this is Ans = 840 I am getting 860.
asked
Jan 25
in
Programming
by
Shubhanshu
Boss
(
15k
points)

84
views
datastructure
coandarchitecture
binarytree
digitallogic
ripplecounteroperation
mergesort
+2
votes
0
answers
15
Tree level/ Tree height
int find(Struct Node *root){ int a = 0, b = 0, c = 0; if(root == NULL) return 0; if(root>left == NULL && root>right == NULL) return 1; else a = find(root>left); b = find(root>right); c = 1 + max(a,b); return c; } What does the above code find? a) #levels b) height of a rooted tree
asked
Jan 18
in
Programming
by
Tuhin Dutta
Loyal
(
7.9k
points)

89
views
datastructure
binarytree
madeeasytestseries
+1
vote
1
answer
16
DS BINARY TREE
NUMBER OF BINARY TREE POSSIBLE WITH 3 UNLABELED NODES?
asked
Jan 7
in
DS
by
iarnav
Loyal
(
7.3k
points)

93
views
datastructure
binarytree
+2
votes
0
answers
17
DS BINARY TREE
WHAT IS THE RECURRENCE RELATION TO the number of different binary trees on n distinct NODES? I THINK IT IS T(n)=∑nk=1T(k−1)T(nk)
asked
Jan 7
in
DS
by
iarnav
Loyal
(
7.3k
points)

54
views
binarytree
datastructure
+1
vote
0
answers
18
DS TREES
Consider a binary tree T that has 150 leaf nodes. Then the number of TOTAL nodes in T that have exactly two children are ______.
asked
Jan 7
in
DS
by
iarnav
Loyal
(
7.3k
points)

120
views
datastructure
tree
binarytree
–2
votes
0
answers
19
DS BINARY TREE
Consider a binary tree T that has 100 leaf nodes. Then the number of nodes in T that have exactly ONE children are ______.
asked
Jan 7
in
DS
by
iarnav
Loyal
(
7.3k
points)

61
views
datastructure
binarytree
0
votes
1
answer
20
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.3k
points)

160
views
datastructure
binarytree
binarysearchtree
–1
vote
1
answer
21
DS COMPLETE BINARY TREE
IS IT A CBT?
asked
Jan 7
in
DS
by
iarnav
Loyal
(
7.3k
points)

67
views
datastructure
binarytree
+1
vote
1
answer
22
binary treee
The minimum size that an array may require to store a binary tree with 'n' nodes is ______. if queston is about min size of an array ..then we go with compete binary tree or not.
asked
Jan 3
in
Programming
by
Jaspreet Kaur Bains
Junior
(
759
points)

55
views
binarytree
+1
vote
0
answers
23
If the average depth of a node in an nnode binary search tree is O(lg n), then the height of the tree is
asked
Dec 25, 2017
in
DS
by
Rohit Gupta 8
Active
(
2.1k
points)

145
views
binarytree
datastructure
+2
votes
2
answers
24
ISRODEC201757
The $in$$order$ and $pre$$order$ traversal of a binary tree are $\text{d b e a f c g}$ and $\text{a b d e c f g}$ respectively.The $post$$order$ traversal of a binary tree is $\text{e d b g f c a}$ $\text{e d b f g c a }$ $\text{d e b f g c a}$ $\text{d e f g b c a}$
asked
Dec 17, 2017
in
DS
by
gatecse
Boss
(
18k
points)

426
views
isrodec2017
datastructure
binarytree
+1
vote
0
answers
25
Balanced Binary Tree vs Complete Tree
Balanced Binary Tree vs Complete Tree Insertion and Deletion is faster in which of the above 2 structures?
asked
Dec 8, 2017
in
Algorithms
by
VS
Loyal
(
8.7k
points)

97
views
selfdoubt
datastructure
binarytree
+2
votes
1
answer
26
How to draw a Binary tree
asked
Dec 5, 2017
in
DS
by
LoveCS
(
31
points)

241
views
datastructure
binarytree
+4
votes
3
answers
27
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)

392
views
binarytree
binarysearch
binarysearchtree
+1
vote
1
answer
28
Tree Traversal doubt
Please tell me  1) What is top down evaluation of Parse tree? 2) What is Bottom Up evaluation of Parse Tree 3) What is Depth First left to right evaluation of Parse tree? Is 1 and 3 are equal? Please make a small tree and show how to traverse Top down and Bottom up? Also, Explain how Top down and Bottom up Parser work is it same as Tree evaluation?
asked
Nov 22, 2017
in
Compiler Design
by
iarnav
Loyal
(
7.3k
points)

59
views
binarytree
compilerdesign
lrparser
+2
votes
3
answers
29
tree traversals , how to approach?
Let T be a rooted binary tree whose vertices are labelled with symbols a, b, c, d, e, f, g, h, i, j, k. Suppose the inorder and postorder traversals of T produce the following sequences. inorder: a, b, c, d, e, f, g, h, i, j, k postorder: a, c, b, e, f, h, j, k, i, g, d How many leaves does the tree have?
asked
Nov 13, 2017
in
DS
by
Parshu gate
Active
(
4.9k
points)

106
views
binarytree
datastructure
treetraversal
+2
votes
3
answers
30
Tree traversals
For a binary tree T, preorder traversal yields: 11,8,6,4,7,10,19,43,31,29,37,49 and inorder traversal yields: 4,6,7,8,10,11,19,29,31,37,43,49 The height of the T is ________________.
asked
Nov 13, 2017
in
DS
by
Parshu gate
Active
(
4.9k
points)

147
views
binarytree
datastructure
treetraversal
Page:
1
2
3
4
5
6
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
IISc CSA and CDCS written test and interview Experince
IIIT Hyderabad Interview Experience
My failure, Oh wait SUCCESS journey
ALGORITHMS CHECKLIST:
A Failure who got into IISc
Follow @csegate
Gatecse
Recent questions tagged binarytree
Recent Blog Comments
Sir I didn't get an email for GO classroom, ...
any one with marks less than 125 selected?
Thank you @Arjun Sir, @NamitaAIR1, @Priyanka, ...
Your story is very inspiring for the boys like me ...
So you completed your Btech in 5 yrs? How could ...
36,194
questions
43,647
answers
124,091
comments
42,930
users