...
Question 8078 – Data-Structures
April 17, 2024
Question 8515 – Data-Structures
April 17, 2024
Question 8078 – Data-Structures
April 17, 2024
Question 8515 – Data-Structures
April 17, 2024

Question 8113 – Data-Structures

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 _________.

Correct Answer: A

Question 27 Explanation: 
Given is a vertex t at a distance of 4 from the root.

For distance 1, max possible value is (3).
Similarly, for distance 2, max value is (7).
So, maximum number of nodes = 2(h+1) – 1
For distance 4, 2(4+1) – 1 ⇒ 25 – 1 ⇒ 32 – 1 = 31
31 is the last node.

So for distance 4, the maximum possible node will be 31 & minimum will be 16.
A
31
B
32
C
33
D
34
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!!