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
1
answer
1
How to understand difference between n/2 and log(n) when comes to operations on a binary tree
asked
Nov 8
in
DS
by
sripo
Junior
(
755
points)

45
views
datastructure
binarytree
heap
binaryheap
0
votes
0
answers
2
Made Easy Booklet
Suppose a binary tree has only three nodes A, B and C and you are given that the postorder traversal for the tree is BAC. The exact preorder traversal for the tree is. CAB ABC CBA A definite preorder traversal cannot be determined from the information given
asked
Nov 6
in
DS
by
shgarg
(
31
points)

39
views
datastructure
binarytree
madeeasybooklet
treetraversal
0
votes
0
answers
3
Red Black Tree
What is the largest possible number of internal nodes in a redblack tree with black height $4?$
asked
Oct 28
in
DS
by
Lakshman Patel RJIT
Boss
(
14.5k
points)

24
views
datastructure
binarytree
0
votes
0
answers
4
Binary tree
Assume that there is at most $1$ node at height $0$ then a binary tree with $7$ node: $1)$ Has Exactly $8$ edges $2)$ The height of this binary tree is at least $2$ and at most $6$ $3)$ The depth of the root node is zero Which of the above statement are true? $A)1$ $B)3$ $C)2 $ and $3$ $D)1 $ and $ 2$
asked
Oct 27
in
DS
by
Lakshman Patel RJIT
Boss
(
14.5k
points)

35
views
datastructure
binarytree
0
votes
0
answers
5
Binary Tree
I know the answer. But is there any general FORMULA for it? If yes, please provide the complete derivation of it. In the solution, they used $\rightarrow 2^{h1}+1.$ I tried but I am not able to derive it.
asked
Oct 22
in
Programming
by
Soumya29
Boss
(
13.7k
points)

47
views
datastructure
binarytree
0
votes
0
answers
6
Binary tree traversal
find the vertical sum of a binary tree. For example,the tree has 5 vertical lines?
asked
Oct 22
in
DS
by
Lakshman Patel RJIT
Boss
(
14.5k
points)

57
views
datastructure
binarytree
0
votes
0
answers
7
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
(
6.9k
points)

46
views
datastructure
binarytree
binarysearchtree
+1
vote
1
answer
8
Binary tree
A. Total no. Of trees that were there in the forest. B. Total no of nodes in the forest. C. Total no of nodes which have only right child. D. Return max element among all nodes.
asked
Sep 28
in
Programming
by
Vaishnavi01
(
197
points)

49
views
datastructure
binarytree
gate
0
votes
0
answers
9
Data structures
asked
Sep 28
in
Programming
by
Vaishnavi01
(
197
points)

41
views
datastructure
gate
trees
empty
binary
binarytree
+1
vote
1
answer
10
MADE EASY
asked
Sep 2
in
DS
by
nag.swarna
(
209
points)

103
views
binarytree
0
votes
2
answers
11
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
(
749
points)

45
views
binarysearchtree
binarytree
datastructure
0
votes
1
answer
12
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
(
749
points)

45
views
datastructure
binarysearchtree
bst
binarytree
algorithms
0
votes
1
answer
13
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
(
101k
points)

53
views
datastructure
binarytree
binarysearchtree
+1
vote
2
answers
14
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
(
193
points)

77
views
binarytree
0
votes
0
answers
15
#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
Junior
(
529
points)

31
views
datastructure
binarytree
algorithms
0
votes
0
answers
16
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
(
193
points)

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

69
views
binarytree
binarysearchtree
treetraversal
0
votes
1
answer
18
UGCNETJuly2018II25
A text is made up of the characters A, B, C, D, E each occurring with the probability 0.08, 0.40, 0.25, 0.15 and 0.12 respectively. The optimal coding will have the average length of 2.4 1.87 3.0 2.15
asked
Jul 13
in
Probability
by
Pooja Khatri
Active
(
5k
points)

95
views
ugcnetjuly2018ii
probability
binarytree
datastructure
0
votes
1
answer
19
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
(
101k
points)

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

173
views
acetestseries
binarytree
0
votes
2
answers
21
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
(
689
points)

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

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

54
views
binarytree
datastructure
0
votes
0
answers
24
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
(
16k
points)

62
views
binarytree
datastructure
0
votes
1
answer
25
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
(
6.9k
points)

73
views
datastructure
binarytree
+1
vote
0
answers
26
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
(
281
points)

79
views
binarytree
algorithms
dynamicprogramming
permutationsandcombinations
+4
votes
1
answer
27
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
(
101k
points)

200
views
datastructure
binarytree
+1
vote
0
answers
28
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.4k
points)

191
views
gate1997
datastructure
binarytree
0
votes
4
answers
29
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
(
261
points)

190
views
binarytree
algorithms
spanningtree
binarysearchtree
+1
vote
1
answer
30
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.9k
points)

113
views
datastructure
binarytree
binarysearchtree
algorithms
Page:
1
2
3
4
5
6
7
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
Basic LaTeX guide
IIT Madras Phd
Databases GO Classroom
Happy Birthday Sir Arjun
NIELIT EXAM DATE 2018
Follow @csegate
Gatecse
Recent questions tagged binarytree
Recent Blog Comments
Sir for final year student who have exam in...
I guess you meant while chasing :) Anyway those...
I'll write a post on how to best...
@Gaurav Go through all the previous yr questions,...
42,575
questions
48,566
answers
155,472
comments
63,594
users