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
+1
vote
1
answer
1
MADE EASY
asked
Sep 2
in
DS
by
nag.swarna
(
81
points)

41
views
binarytree
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
(
231
points)

33
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
(
231
points)

30
views
datastructure
binarysearchtree
bst
binarytree
algorithms
0
votes
1
answer
4
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
(
96.1k
points)

49
views
datastructure
binarytree
binarysearchtree
+1
vote
2
answers
5
selfdoubt
Consider a binary tree T that has 50 leaf nodes. Then the number of nodes in T that have exactly ONE children are ______.
asked
Jul 25
in
DS
by
bhavnakumrawat5
(
151
points)

60
views
binarytree
0
votes
0
answers
6
#avl tree
what is the worst case possible height of an avl tree ??? https://www.geeksforgeeks.org/practicequestionsheightbalancedavltree/ how does 1.44*logn comes ????
asked
Jul 23
in
Algorithms
by
vijju532
(
437
points)

30
views
datastructure
binarytree
algorithms
0
votes
0
answers
7
doubttree
If each node of the Btree is 80 percent full, then what is the average number of keys per node of the above B tree?
asked
Jul 20
in
DS
by
bhavnakumrawat5
(
151
points)

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

55
views
binarytree
binarysearchtree
treetraversal
0
votes
1
answer
9
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
(
96.1k
points)

57
views
binarytree
binarysearchtree
algorithms
0
votes
2
answers
10
ACE TEST SERIES QUESTION
asked
Jun 6
in
DS
by
Shankar Kakde
(
57
points)

164
views
acetestseries
binarytree
0
votes
2
answers
11
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
(
675
points)

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

130
views
datastructure
binarytree
0
votes
1
answer
13
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)

48
views
binarytree
datastructure
0
votes
0
answers
14
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
Boss
(
12.5k
points)

58
views
binarytree
datastructure
0
votes
1
answer
15
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
Loyal
(
5.7k
points)

69
views
datastructure
binarytree
+1
vote
0
answers
16
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
(
271
points)

73
views
binarytree
algorithms
dynamicprogramming
permutationsandcombinations
+4
votes
1
answer
17
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
(
96.1k
points)

194
views
datastructure
binarytree
+1
vote
0
answers
18
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.3k
points)

184
views
gate1997
datastructure
binarytree
0
votes
4
answers
19
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
(
243
points)

179
views
binarytree
algorithms
spanningtree
binarysearchtree
+1
vote
1
answer
20
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
(
5.7k
points)

111
views
datastructure
binarytree
binarysearchtree
algorithms
+7
votes
4
answers
21
GATE201820
The postorder traversal of a binary tree is $\text{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
(
18.1k
points)

1.6k
views
gate2018
datastructure
binarytree
numericalanswers
+6
votes
1
answer
22
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
(
8k
points)

318
views
datastructure
binarysearchtree
binarytree
+2
votes
0
answers
23
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
(
15.2k
points)

99
views
datastructure
coandarchitecture
binarytree
digitallogic
ripplecounteroperation
mergesort
+2
votes
0
answers
24
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
(
8.1k
points)

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

106
views
datastructure
binarytree
+2
votes
0
answers
26
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
(
8.1k
points)

61
views
binarytree
datastructure
+1
vote
0
answers
27
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
(
8.1k
points)

143
views
datastructure
tree
binarytree
–2
votes
0
answers
28
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
(
8.1k
points)

72
views
datastructure
binarytree
0
votes
1
answer
29
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.1k
points)

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

74
views
datastructure
binarytree
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
kvs pgt
Algorithms GO Classroom
Programming and DS GO Classroom
Discrete Mathematics GO Classroom
Digital Logic GO Classroom
Follow @csegate
Gatecse
Recent questions tagged binarytree
Recent Blog Comments
@Arjun sir how to remove such post? should i hide...
[email protected]
.Plz do share @Sanjay sharma
Please post it as question
This is blog area post it as question
[email protected]
39,778
questions
46,781
answers
140,752
comments
58,672
users