TCS Trees Quiz-1

Question 1

Time: 00:00:00
For the binary tree shown in the figure , the in-order traversal sequence will be

Trees Inorder

HDIJBKEALFMCNGO

HDIJBKEALFMCNGO

HDIBJEKALFMCNGO

HDIBJEKALFMCNGO

HIDJBKEALFNCMGO

HIDJBKEALFNCMGO

HIDJBEKLAMFCNOG

HIDJBEKLAMFCNOG

Question 2

Time: 00:00:00
Assuming that the tree's height starts from 0. Then number of nodes in a tree of height h will be?

(2h )

(2h )

(2h – 1)

(2h – 1)

(2h+1 – 1)

(2h+1 – 1)

(2h-1 – 1)

(2h-1 – 1)

Question 3

Time: 00:00:00
The data structure used by level order traversal binary tree:

Linked List

Linked List

Queue

Queue

Array

Array

Stacks

Stacks

Question 4

Time: 00:00:00
For the binary tree shown in the figure , the pre-order traversal sequence is

Trees PreOrder

10 11 12 15 18 22 25 35 44 50 64 66 70 90

10 11 12 15 18 22 25 35 44 50 64 66 70 90

25 15 10 12 11 22 18 35 50 44 66 7064 90

25 15 10 12 11 22 18 35 50 44 66 7064 90

25 15 10 12 11 22 18 50 35 44 70 66 64 90

25 15 10 12 11 22 18 50 35 44 70 66 64 90

11 12 10 18 15 22 44 35 64 66 90 70 50 25

11 12 10 18 15 22 44 35 64 66 90 70 50 25

Question 5

Time: 00:00:00
A binary tree where all the node have either two children or zero, known as

Full binary tree

Full binary tree

Complete binary tree

Complete binary tree

Binary search tree

Binary search tree

AVL binary tree

AVL binary tree

Question 6

Time: 00:00:00
If the preorder and inorder traversal of the binary tree is ABDEFCGHJLK and DBFEAGCLJHK respectively, so what is the postorder traversal.?

DFEBGLJKHCA

DFEBGLJKHCA

DFEBLJGKHCA

DFEBLJGKHCA

DFEBLKHGJCA

DFEBLKHGJCA

DFEBLGKJHCA

DFEBLGKJHCA

Question 7

Time: 00:00:00
If 11, 6, 7, 9,10,8,12,15 is inserted in the tree, so what will the height of the binary search tree?

2

2

6

6

4

4

5

5

Question 8

Time: 00:00:00
The preorder and inorder traversal of the tree is ABDEFCGHJLK and DBFEAGCLJHK respectively so design the tree.



B.





A

A

B

B

C

C

D

D

Question 9

Time: 00:00:00
What is the maximum number of nodes in full binary tree, which have a depth 3 ?

4

4

10

10

15

15

12

12

Question 10

Time: 00:00:00
 What is the depth of the following binary tree?

1

1

2

2

3

3

4

4

null
null

Buy TCS Prog. Logic (C MCQ) Paid Materials

Join TCS Online Classes