Computer Science EngineeringVery hard

Keys 50, 30, 70, 20, 40, 60, 80 are inserted into an empty BST in this order. The postorder traversal is

  1. A. 20 30 40 50 60 70 80
  2. B. 20 40 30 60 80 70 50
  3. C. 20 40 30 50 60 80 70
  4. D. 50 30 20 40 70 60 80

Correct answer: B. 20 40 30 60 80 70 50

Postorder visits left subtree 20 40 30, then right subtree 60 80 70, then the root 50.

More Algorithms, Data Structures & Programming (ISRO CS) questions

Exams that ask this topic