Algorithms
October 13, 2023
Database-Management-System
October 13, 2023
Algorithms
October 13, 2023
Database-Management-System
October 13, 2023

Algorithms

Question 38

Consider the following rooted tree with the vertex labeled P as t he root:

The order in which the nodes are visited during in-order traversal is

A
SQPTRWUV
B
SQPTUWRV
C
SQPTWUVR
D
SQPTRUWV
Question 38 Explanation: 
The tree can be redrawn as

Inorder Traversal: Left, Root, Middle, Right.
So, during inorder traversal whenever we visit the node second time then print it.
So, output will be,
S Q P T R W U V
Correct Answer: A
Question 38 Explanation: 
The tree can be redrawn as

Inorder Traversal: Left, Root, Middle, Right.
So, during inorder traversal whenever we visit the node second time then print it.
So, output will be,
S Q P T R W U V
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!