Binary Tree: GATE CS Previous Year Questions

Binary Tree · Data Structures

35 questions · asked in 17 of 27 years (2000–2026)

MCQ 27 · NAT 81-mark 26 · 2-mark 9

2000Questions per year2026

Questions 6–10 of 35

Q6GATE 20192 marksNAT
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 (i.e., the number of edges in the unique path between a and b) is (rounded off to 2 decimal places) ___________ .

Q7GATE 20181 markNAT
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 ______.

Q8GATE 2016 (Session 2)2 marksMCQ−0.67 if wrong
Consider the following New-order strategy for traversing a binary tree:
Visit the root;
Visit the right sub tree using New-order;
Visit the left sub tree using New-order;
The New-order traversal of the expression tree corresponding to the reverse polish expression
3 4 * 5 - 2 ^ 6 7 * 1 + - is given by:

Q9GATE 2015 (Session 1)1 markMCQ−0.33 if wrong
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are

Q10GATE 2015 (Session 2)1 markNAT
A binary tree T has 20 leaves. The number of nodes in T having two children is _______.

Keep practising

Topics in Data Structures

All CS topics ›