Awesome q2a theme
Ask us anything
Toggle navigation
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Blogs
Previous Year
Exams
Recent questions tagged binarytree
+1
vote
0
answers
#self doubt #Time complexity #tree
1) Time complexity to construct a Binary tree when inorder and preorder/postorder traversal of the tree is given. a) if inorder sorted b) if inorder is not sorted. 2) If construct Binary tree when preorder and postorder to the tree is given. .....… My answer: 1 a) O( nlogn) 1 b) O(nlogn) 2) O(2^n) Please check and correct Thanks
asked
Feb 27
in
Algorithms
by
Hradesh patel
(
9
points)

16
views
selfdoubt
binarytree
timecomplexity
+1
vote
0
answers
Made easy Topicwise DS
"Consider the following array of elements <40, 35, 20, 10, 15, 16, 17, 8, 4, 30>. The minimum number of interchanges needed to convert it into a minheap is _________ using built heap method." I am getting 7.
asked
Jan 6
in
Programming
by
anurags228
(
23
points)

25
views
heap
binarytree
datastructures
0
votes
0
answers
Made Easy Topic Wise DS
The number of min heap trees are possible with 15 distinct elements such that every leaf node must be greater than all nonleaf nodes of the tree are ________. According to me, the answer should be 80* 8! The given answer is different.
asked
Jan 6
in
Programming
by
anurags228
(
23
points)

51
views
binarytree
datastructures
0
votes
0
answers
#Self Doubt #Data_Strct #Binary_Tree
Maximum number of node at level I is 2^I. Prove
asked
Dec 19, 2020
in
DS
by
ApolloXYZ
(
1
point)

11
views
datastructures
binarytree
0
votes
0
answers
#Self Doubt #Data_Strct #Binary_Tree
What are the total number of nodes in a binary tree of height K ?
asked
Dec 19, 2020
in
DS
by
ApolloXYZ
(
1
point)

10
views
datastructures
binarytree
0
votes
1
answer
#Self Doubt #Data Struct
Prove by Induction that if T us a binary tree with n internal nodes, I its internal path lane and P its external path lane then E=I+2n, where n>=0
asked
Dec 17, 2020
in
DS
by
ApolloXYZ
(
1
point)

13
views
datastructures
binarytree
0
votes
0
answers
#Self Doubt #DataStrct
Prove that Maximum no. of node at level I is 2^I
asked
Dec 16, 2020
in
DS
by
ApolloXYZ
(
1
point)

15
views
datastructures
binarytree
0
votes
0
answers
#Self Doubt #DSBinaryTree
Prove by Induction that if T is a binary tree with n internal nodes, I (its internal path lane) and P (its external path lane), then E=I+2n where n>=0
asked
Dec 16, 2020
in
DS
by
ApolloXYZ
(
1
point)

6
views
datastructures
binarytree
0
votes
2
answers
#Self Doubt #DataStruct
The degree of a node is the no. of children it has. Show that in any binary tree the number of leaves is 1 more than the no. of nodes of degree 2.
asked
Dec 16, 2020
in
DS
by
ApolloXYZ
(
1
point)

39
views
datastructures
binarytree
0
votes
1
answer
NIELIT NIC scientistB 2020 setC ques 82
Suppose we have to insert the following sequence of keys into an empty binary search tree: 5, 7, 45, 60, 50, 23, 15, 54 What would be the height of binary search tree?
asked
Nov 26, 2020
in
DS
by
ayush.5
(
99
points)

20
views
binarytree
0
votes
0
answers
Source: http://www.cs.iit.edu/~iraicu/teaching/EECS211/quiz4sol.pdf
asked
Nov 18, 2020
in
DS
by
rish18
(
9
points)

53
views
selfdoubt
binarytree
datastructures
0
votes
0
answers
AVL tree help
The vertex of a binary tree is called an single child if it has a father's vertex but does not have a neighbor. The root is not considered an single child. numOnly indicate the number of vertices in binary tree that hold the attribute "single son ", and ... in the binary tree i need to prove that every nonempty AVL tree has inequality $\frac{numOnly}{n}\leq \frac{1}{2}$
asked
Sep 17, 2020
in
Algorithms
by
eden
(
5
points)

51
views
binarytree
0
votes
2
answers
#datastructure #madeeasy
here L = no of leaves, n = n ary, i = no of internal node so L = (n1)*i +1 L = (31)*10 +1 L = 2*10 +1 = 21 so total no of leaf node = 21?? please clear my doubt
asked
Aug 15, 2020
in
DS
by
Ankur29
(
5
points)

21
views
madeeasytestseries
datastructures
binarytree
0
votes
1
answer
Self Doubt  Left Child Right Sibling (LCRS) representation
asked
Aug 15, 2020
in
DS
by
KUSHAGRA गुप्ता
(
1.4k
points)

50
views
datastructures
trees
binarytree
0
votes
0
answers
geekforgeeks
Consider the following characters and their respective frequency: e  4 f  8 g  16 k  32 o  10 r  12 s  18 If Huffman coding is used to encode the message, ... (B) 0100000100001100101000001000011001000000001011 (C) 1111111101001011111011110 011010111110111100110 (D) 1011111011110 011011111111010010111110111100110 What would be the tree for this ?
asked
Aug 2, 2020
in
Algorithms
by
anurag_yo
(
5
points)

11
views
algorithms
huffmancode
binarytree
0
votes
0
answers
Geekforgeeks Contest  Algorithms
Huffman coding is a lossless data compression algorithm. The most frequent character gets the smallest code and the least frequent character gets the largest code. Consider the following statements regarding Huffman coding algorithm? S1 : The time ... statements S1, S2, and S3 are correct. I am not getting proper explanation on Geekforgeeks for this question.
asked
Aug 1, 2020
in
Algorithms
by
anurag_yo
(
5
points)

27
views
algorithms
timecomplexity
huffmancode
binarytree
0
votes
0
answers
MadeEasy Test series  Binary tree question
These are the options given: (a) Print nodes at K distance from root node. (b) Print nodes of Kth level of binary tree. (c)Both a and b (d) None of these I think the answer would be Both (a) and (b), if we consider root node at Level 0. But the answer given is (a) only If someone could explain why (b) is not the answer than it would be great help.
asked
Jul 26, 2020
in
DS
by
luc_Bloodstone
(
19
points)

12
views
datastructures
madeeasytestseries
binarytree
0
votes
0
answers
Binary Trees
Which of the following is a true about Binary Trees A Every binary tree is either complete or full. B Every complete binary tree is also a full binary tree. C Every full binary tree is also a complete binary tree. D No binary tree is both complete and full. E ... has 0 or 2 children at each node and Full have only 2 children at each node. Please tell if this statement is true or not.
asked
Jul 18, 2020
in
DS
by
arpit_18
(
5
points)

29
views
binarytree
trees
datastructrues
0
votes
0
answers
Uniqueness of Inorder, Preorder, and Postorder traversal with null elements
asked
Jul 12, 2020
in
Programming
by
jatin khachane 1
(
5
points)

28
views
binarytree
0
votes
0
answers
made easy test series : Binary Tree
root → value = SumElements(root → left) root → value = SumElements(root → right) root → value = SumElements(root → left) + SumElements(root → right) SumElements(root → left) + SumElements(root → right) according to me ans shoul be none of ... + SumElements(root → left) + SumElements(root → right) but they have given ans is 3rd option.Am I missing something here??
asked
Jul 4, 2020
in
DS
by
abcd9982
(
87
points)

33
views
madeeasytestseries
datastructures
binarytree
0
votes
1
answer
binary trees
what are external path and internal path in binary trees? what are the formulas related to external path length and internal path length?
asked
Jun 10, 2020
in
DS
by
nttarun
(
5
points)

20
views
binarytree
trees
0
votes
0
answers
Binary Tree Creation
This is function to create binary tree.But I am unable to write the base case for this recursion function.Any idea how it can be done? private static Node create() { Scanner sc = new Scanner(System.in); int value; System.out.println("Enter a value:" ... of " + value); newnode.right = create(); sc.close(); return newnode; } Thanks for your time and help in advance.
asked
May 23, 2020
in
Programming
by
amitnegi99
(
5
points)

9
views
datastructures
binarytree
0
votes
0
answers
GATE201946 Video Solution
Let $T$ be a full binary tree with $8$ leaves. (A full binary tree has every level full.) Suppose two leaves $a$ and $b$ of $T$ are chosen uniformly and independently at random. The expected value of the distance between $a$ and $b$ in $T$ (ie., the number of edges in the unique path between $a$ and $b$) is (rounded off to $2$ decimal places) _________.
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

63
views
gate2019
numericalanswers
datastructures
binarytree
videosolution
0
votes
0
answers
GATE201129 Video Solution
We are given a set of $n$ distinct elements and an unlabeled binary tree with $n$ nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree? $0$ $1$ $n!$ $\frac{1} {n+1} .^{2n}C_n$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

8
views
gate2011
binarytree
normal
videosolution
0
votes
0
answers
GATE20022.12 Video Solution
A weightbalanced tree is a binary tree in which for each node, the number of nodes in the left sub tree is at least half and at most twice the number of nodes in the right sub tree. The maximum possible height (number of nodes on the path from the root to the furthest leaf) ... which of the following? $\log_2 n$ $\log_{\frac{4}{3}} n$ $\log_3 n$ $\log_{\frac{3}{2}} n$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

11
views
gate2002
datastructures
binarytree
normal
videosolution
0
votes
0
answers
GATE2014112 Video Solution
Consider a rooted n node binary tree represented using pointers. The best upper bound on the time required to determine the number of subtrees having exactly $4$ nodes is $O(n^a\log^bn)$. Then the value of $a+10b$ is __________.
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

7
views
gate20141
datastructures
binarytree
numericalanswers
normal
videosolution
0
votes
0
answers
GATE19951.17 Video Solution
A binary tree $T$ has $n$ leaf nodes. The number of nodes of degree $2$ in $T$ is $\log_2 n$ $n1$ $n$ $2^n$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

7
views
gate1995
datastructures
binarytree
normal
videosolution
0
votes
0
answers
GATE19974.5 Video Solution
A binary search tree contains the value $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? $5 \ 3 \ 1 \ 2 \ 4 \ 7 \ 8 \ 6$ $5 \ 3 \ 1 \ 2 \ 6 \ 4 \ 8 \ 7$ $5 \ 3 \ 2 \ 4 \ 1 \ 6 \ 7 \ 8$ $5 \ 3 \ 1 \ 2 \ 4 \ 7 \ 6 \ 8$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

9
views
gate1997
datastructures
binarytree
normal
videosolution
0
votes
0
answers
GATE2006IT9 Video Solution
In a binary tree, the number of internal nodes of degree $1$ is $5$, and the number of internal nodes of degree $2$ is $10$. The number of leaf nodes in the binary tree is $10$ $11$ $12$ $15$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

11
views
gate2006it
datastructures
binarytree
normal
videosolution
0
votes
0
answers
GATE200713 Video Solution
The maximum number of binary trees that can be formed with three unlabeled nodes is: $1$ $5$ $4$ $3$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

7
views
gate2007
datastructures
binarytree
normal
videosolution
0
votes
0
answers
GATE2016236 Video Solution
Consider the following Neworder strategy for traversing a binary tree: Visit the root; Visit the right subtree using Neworder; Visit the left subtree using Neworder; The Neworder traversal of the expression tree corresponding to the reverse polish expression 3 4 * 5  2 ^ 6 7 * 1 +  is given by: ... $1 \ 7 \ 6 * + \ 2 \ 5 \ 4 \ 3 \ * \  \wedge $
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

15
views
gate20162
datastructures
binarytree
normal
videosolution
0
votes
0
answers
GATE2015210 Video Solution
A binary tree T has $20$ leaves. The number of nodes in T having two children is ______.
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

8
views
gate20152
datastructures
binarytree
normal
numericalanswers
videosolution
0
votes
0
answers
GATE2007IT63 Video Solution
A group of $15$ routers is interconnected in a centralized complete binary tree with a router at each tree node. Router $i$ communicates with router $j$ by sending a message to the root of the tree. The root then sends the message back down to router $j$ ... number of hops per message, assuming all possible router pairs are equally likely is $3$ $4.26$ $4.53$ $5.26$
asked
Apr 18, 2020
in
Computer Networks
by
admin
(
573
points)

112
views
gate2007it
computernetworks
routing
binarytree
normal
videosolution
0
votes
0
answers
GATE200712 Video Solution
The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number of nodes in a binary tree of height $h$ is: $2^h 1$ $2^{h1} 1$ $2^{h+1} 1$ $2^{h+1}$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

7
views
gate2007
datastructures
binarytree
easy
videosolution
0
votes
0
answers
GATE2008IT76 Video Solution
A binary tree with $n > 1$ nodes has $n_1$, $n_2$ and $n_3$ nodes of degree one, two and three respectively. The degree of a node is defined as the number of its neighbours. $n_3$ can be expressed as $n_1 + n_2  1$ $n_1 2$ $[((n_1 + n_2)/2)]$ $n_2  1$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

4
views
gate2008it
datastructures
binarytree
normal
videosolution
0
votes
0
answers
GATE199101,viii Video Solution
The weighted external path length of the binary tree in figure is ______
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

9
views
gate1991
binarytree
datastructures
normal
videosolution
0
votes
0
answers
GATE2015325 Video Solution
Consider a binary tree T that has $200$ leaf nodes. Then the number of nodes in T that have exactly two children are ______.
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

8
views
gate20153
datastructures
binarytree
normal
numericalanswers
videosolution
0
votes
0
answers
GATE2005IT50 Video Solution
In a binary tree, for every node the difference between the number of nodes in the left and right subtrees is at most $2$. If the height of the tree is $h > 0$, then the minimum number of nodes in the tree is $2^{h1}$ $2^{h1} + 1$ $2^h  1$ $2^h$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

4
views
gate2005it
datastructures
binarytree
normal
videosolution
0
votes
0
answers
GATE20002.16 Video Solution
Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited `in a postorder, inorder and preorder traversal respectively, of a complete binary tree. Which of the following is always true? LASTIN = LASTPOST LASTIN = LASTPRE LASTPRE = LASTPOST None of the above
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

9
views
gate2000
datastructures
binarytree
normal
videosolution
0
votes
0
answers
GATE2008IT77 Video Solution
A binary tree with $n > 1$ nodes has $n_1$, $n_2$ and $n_3$ nodes of degree one, two and three respectively. The degree of a node is defined as the number of its neighbours. Starting with the above tree, while there remains a node $v$ of degree two in the tree, add ... remain at the end of the process? $2 * n_1 3$ $n_2 + 2 * n_1  2$ $n_3  n_2$ $n_2+ n_1 2$
asked
Apr 18, 2020
in
DS
by
admin
(
573
points)

8
views
gate2008it
datastructures
binarytree
normal
videosolution
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
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Recent Posts
New GATEOverflow PDFs
Guidelines to users
No Recent Blog Comments
9,211
questions
3,186
answers
14,687
comments
96,181
users