Skip to content
Related Articles

Related Articles

Algorithms Quiz | SP Contest 1 | Question 3
  • Last Updated : 11 Jul, 2018
GeeksforGeeks - Summer Carnival Banner

The Postorder traversal of a Binary Search Tree is {35, 30, 45, 40, 70, 85, 90, 80, 50}. What is its Preorder traversal?
(A) 50, 40, 30, 35, 45, 80, 70, 90, 85
(B) 50, 40, 45, 30, 35 ,80 , 90, 85, 70
(C) 50, 80, 90, 85, 70, 40, 45, 30, 35
(D) 30, 35, 40, 45, 50, 70, 80, 85, 90


Answer: (A)

Explanation: You may create a BST from it’s given post order traversal and then find it’s preorder traversal. Please refer to the post on Construct a Binary Search Tree from given postorder.

Quiz of this Question

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :