You can prepare effectively for Computer Science Engineering (CSE) Programming and Data Structures with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Trees - 1". These 15 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.
Test Highlights:
Sign up on EduRev for free to attempt this test and track your preparation progress.
Detailed Solution: Question 1
In a complete k-ary tree, every internal node has exactly k children or no child. The number of leaves in such a tree with n internal nodes is:
Detailed Solution: Question 2
The maximum number of binary trees that can be formed with three unlabeled nodes is:
Detailed Solution: Question 3
The number of leaf nodes in a rooted tree of n nodes, with each node having 0 or 3 children is:
Detailed Solution: Question 4
A complete n-ary tree is a tree in which each node has n children or no children. Let I be the number of internal nodes and L be the number of leaves in a complete n-ary tree. If L = 41, and I = 10, what is the value of n?
Detailed Solution: Question 5
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, is stored in X[2i] and the right child, if any, in X[2i+1]. To be able to store any binary tree on n vertices the minimum size of X should be.
Detailed Solution: Question 6
Postorder traversal of a given binary search tree, T produces the following sequence of keys
10, 9, 23, 22, 27, 25, 15, 50, 95, 60, 40, 29
Which one of the following sequences of keys can be the result of an in-order traversal of the tree T? (GATE CS 2005)
Detailed Solution: Question 7
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, or further nested. Which of the following represents a valid binary tree?
Detailed Solution: Question 8
In a binary tree with n nodes, every node has an odd number of descendants. Every node is considered to be its own descendant. What is the number of nodes in the tree that have exactly one child?
Detailed Solution: Question 9
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
Detailed Solution: Question 10
A binary tree T has 20 leaves. The number of nodes in T having two children is
Detailed Solution: Question 11
Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is
Detailed Solution: Question 12
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 this BFS traversal, then the maximum possible value of n is ________.
Detailed Solution: Question 13
The number of structurally different possible binary trees with 4 nodes is
Detailed Solution: Question 14
Detailed Solution: Question 15
161 docs|30 tests |