Skip to content
Early access — you're among the first to try PYQLabs. Share feedback
Concept drill

binary tree

GATE CSE & IT · Data Structures - Trees · 1987-2026

35
PYQs
77%
keyed
3
elite explanations
20
years appeared

Study anchor

Source-book anchor pending for this concept.

Practice action

Start latest PYQ

PYQs in this concept

All concepts →
2026 PYQ

Consider a knock-out women's badminton singles tournament where there are no ties. The loser in each game is eliminated from the tournament. Every player plays until she is defeate...

easyanswer keyelite explanation
2026 PYQ

The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal. $$ \begin{array}{ll}\,\,\,\,\, \text { T } &\,\,\,\,\...

easyanswer keyelite explanation
2026 PYQ

The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with 23 nodes is $\_\_...

easybasic explanation
2025 Q13

Consider a binary tree T in which every node has either zero or two children. Let n > 0 be the number of nodes in T. Which ONE of the following is the number of nodes in T that hav...

mediumanswer key
2025 PYQ

Consider a binary tree $T$ in which every node has either zero or two children. Let $n>0$ be the number of nodes in $T$. Which ONE of the following is the number of nodes in $T$ th...

easyanswer keyelite explanation
2021 PYQ

Consider a complete binary tree with 7 nodes. Let A denote the set of first 3 elements obtained by performing Breadth-First Search (BFS) starting from the root. Let B denote the se...

easybasic explanation
2019 PYQ

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...

mediumbasic explanation
2018 PYQ

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 longes...

medium
2016 PYQ

Breadth First Search $$(BFS)$$ is started on a binary tree beginning from the root vertex. There is a vertex $$t$$ at a distance four from the root. If t is the $$n$$-th vertex in...

easy
2016 PYQ

Consider the following $$New-order$$ strategy for traversing a binary tree: $$\,\,\,\,\,\,\, \bullet \,\,\,\,\,$$ Visit the root; $$\,\,\,\,\,\,\, \bullet \,\,\,\,\,$$ Visit the ri...

mediumanswer key
2015 PYQ

A binary tree $$T$$ has $$20$$ leaves. The number of nodes in $$T$$ having two children is _______________.

easy
2015 PYQ

Consider a binary tree $$T$$ that has $$200$$ leaf nodes. Then, the number of nodes in $$T$$ that have exactly two children are ________.

easy
2014 PYQ

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 O(n a Log b n...

medium
2012 PYQ

The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudocode below is invoked as height (root) to compute the height...

mediumanswer key
2008 PYQ

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 neighb...

mediumanswer key
2008 PYQ

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 neighb...

mediumanswer key
2008 PYQ

The following three are known to be the preorder, inorder and postorder sequences of a binary tree. But it is not known which is which. MBCAFHPYK KAMCBYPFH MABCKYFPH Pick the true...

mediumanswer key
2007 PYQ

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:

easyanswer key
2007 PYQ

The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g, respectively. The postorder traversal of the binary tree is:

easyanswer key
2007 PYQ

Consider the following C program segment where CellNode represents a node in a binary tree: struct CellNode { struct CellNOde *leftChild; int element; struct CellNode *rightChild;...

easyanswer key
2007 PYQ

The maximum number of binary trees that can be formed with three unlabeled nodes is:

easyanswer key
2007 PYQ

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:

easyanswer key
2006 PYQ

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

easyanswer key
2006 PYQ

A scheme for storing binary trees in an array X is as follows. Indexing of X starts at 1 instead of 0. the root is stored at X[1]. For a node stored at X[i], the left child, if any...

mediumanswer key
2005 PYQ

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...

mediumanswer key
2004 PYQ

Consider the following C program segment struct CellNode{ struct CellNode *leftChild; int element; struct CellNode *rightChild; }; int Dosomething (struct CellNode *ptr) { int valu...

easyanswer key
2004 PYQ

Consider the label sequences obtained by the following pairs of traversals on a labeled binary tree. Which of these pairs identify a tree uniquely? i) preorder and postorder ii) in...

easyanswer key
2000 PYQ

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 a...

mediumanswer key
2000 PYQ

Consider the following nested representation of binary trees: (X Y Z) indicates Y and Z are the left and right sub stress, respectively, of node X. Note that Y and Z may be NULL, o...

easyanswer key
1998 PYQ

Which of the following statements is false?

mediumanswer key
1996 PYQ

Which of the following sequences denotes the post order traversal sequence of the tree of previous question?

easyanswer key
1995 PYQ

A binary tree T has n leaf nodes. The number of nodes of degree 2 in T is:

easyanswer key
1994 PYQ

Which one of the following statements is false?

easyanswer key
1987 PYQ

If the no of leaves in a tree is not a power of 2,then the tree is not a binary tree.

easyanswer key
1987 PYQ

It is possible to construct a binary tree uniquely whose pre-order and post-order traversals are given.

easyanswer key