Test: Trees- 1 - Computer Science Engineering (CSE) MCQ


Test Description

10 Questions MCQ Test Question Bank for GATE Computer Science Engineering - Test: Trees- 1

Test: Trees- 1 for Computer Science Engineering (CSE) 2024 is part of Question Bank for GATE Computer Science Engineering preparation. The Test: Trees- 1 questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Trees- 1 MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Trees- 1 below.
Solutions of Test: Trees- 1 questions in English are available as part of our Question Bank for GATE Computer Science Engineering for Computer Science Engineering (CSE) & Test: Trees- 1 solutions in Hindi for Question Bank for GATE Computer Science Engineering course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Trees- 1 | 10 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study Question Bank for GATE Computer Science Engineering for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Trees- 1 - Question 1

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

Detailed Solution for Test: Trees- 1 - Question 1

Because for 2 degree node, every time ‘2’ leafs are added and number of nodes increases is '1'. So number of nodes with degree 2 is always one less than number f leafs present in tree.

Test: Trees- 1 - Question 2

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

Detailed Solution for Test: Trees- 1 - Question 2

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Trees- 1 - Question 3

In the balanced binary tree in the figure given below, how many nodes will become unbalanced when a node is inserted as a child of the node "g”?

Detailed Solution for Test: Trees- 1 - Question 3


When a node is added as a child of g.

Nodes a, b and c become unbalanced.

Test: Trees- 1 - Question 4

A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively is

Detailed Solution for Test: Trees- 1 - Question 4

The binary search tree is

The number of nodes in the left subtree and right subtree of the root respectively is (7, 4).

Test: Trees- 1 - Question 5

A binary search tree contains the values 1,2,3, 4, 5, 6, 7, 8. The tree is traversed in pre-order and the values are printed out. Which of the following sequences is a valid output?

Detailed Solution for Test: Trees- 1 - Question 5

(a) 53124786

6 can not be child of 8.
(b) 5312648

4 can not be child of 6.
(c) 53241678

1 can not be child of 4 or 5.

Test: Trees- 1 - Question 6

Which of the following statements is false?

Detailed Solution for Test: Trees- 1 - Question 6

A labelled rooted binary tree can not be constructed uniquely when inorder traversal is given along with post-order or pre-order traversal.

Test: Trees- 1 - Question 7

A complete n-ary tree is one in which every node has 0 or n sons. If x is the number of internal nodes of a complete n-ary tree, the number of leaves in it is given by

Detailed Solution for Test: Trees- 1 - Question 7

In n-ary tree the total number of vertices are m = nx + 1
Where x: number of internal nodes and let l be the number of leaf nodes.
x + l = nx +1
l = (n - 1)x + 1
So number of leaf nodes in n-ary tree with x internal nodes is (n - 1) x + 1.

Test: Trees- 1 - Question 8

Consider the following nested representation of binary trees: (X Y Z) indicates Y and Z are the left and right subtrees, 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 for Test: Trees- 1 - Question 8

(1 (2 3 4) (5 6 7))

Test: Trees- 1 - Question 9

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?

Detailed Solution for Test: Trees- 1 - Question 9

Because of complete binary tree option (b) is always correct.

Test: Trees- 1 - Question 10

The number of leaf nodes in a rooted tree of n nodes, with each node having 0 or 3 children is

Detailed Solution for Test: Trees- 1 - Question 10

In m-ary tree
Total number of nodes = m(internal nodes) + 1
Here, n = 3i + 1
Total nodes = Internal nodes + Leaf nodes 

Where l is leaf nodes.

63 videos|7 docs|165 tests
Information about Test: Trees- 1 Page
In this test you can find the Exam questions for Test: Trees- 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Trees- 1, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)