Skip to content
Related Articles

Related Articles

Improve Article

UGC-NET | UGC NET CS 2015 Dec – II | Question 38

  • Last Updated : 02 May, 2018

The inorder traversal of the following tree is:
38 (3)

(A) 2 3 4 6 7 13 15 17 18 18 20
(B) 20 18 18 17 15 13 7 6 4 3 2
(C) 15 13 20 4 7 17 18 2 3 6 18
(D) 2 4 3 13 7 6 15 17 20 18 18


Answer: (D)

Explanation: In inorder traversal first we traverse left node then root node and then right node:
In the following tree
38 (3) (2)
we first go to the leftmost node then its root after that right i.e. 2 4 3 13 7 6 15 17 20 18 18. In rest of the option inorder property is violating.
So, option (D) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up