Postorder traversal of a given binary search tree T produces following sequence of keys: 3, 5, 7, 9, 4, 17, 16, 20, 18, 15, 14 Which one of the following sequences of keys can be the result of an in-order traversal of the tree T?

This question was previously asked in
UGC NET Computer Science (Paper 2) Nov 2017 Official Paper
View all UGC NET Papers >
  1. 3, 4, 5, 7, 9, 14, 20, 18, 17, 16, 15
  2. 20, 18, 17, 16, 15, 14, 3, 4, 5, 7, 9
  3. 20, 18, 17, 16, 15, 14, 9, 7, 5, 4, 3
  4. 3, 4, 5, 7, 9, 14, 15, 16, 17, 18, 20

Answer (Detailed Solution Below)

Option 4 : 3, 4, 5, 7, 9, 14, 15, 16, 17, 18, 20
Free
UGC NET Paper 1: Held on 21st August 2024 Shift 1
10.8 K Users
50 Questions 100 Marks 60 Mins

Detailed Solution

Download Solution PDF

The correct answer is "option 4".

CONCEPT:

The in-order traversal of the Binary Search Tree(BST) always gives elements in ascending or increasing order.

So, in-order traversal of the sequence of keys given in post-order traversal is sorted ascending order of that keys.

Hence, the sequence of keys in an in-order traversal of BST are : 3, 4, 5, 7, 9, 14, 15, 16, 17, 18, 20

Latest UGC NET Updates

Last updated on Jun 12, 2025

-> The UGC NET June 2025 exam will be conducted from 25th to 29th June 2025.

-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.

-> The exam is conducted bi-annually - in June and December cycles.

-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions. 

-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.

More Tree Traversal Questions

More Tree Questions

Get Free Access Now
Hot Links: teen patti classic teen patti wealth teen patti bliss teen patti master gold apk teen patti plus