Question 8Asked in UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)

The in order and preorder Traversal of binary tree are dbeafcg and abdecfg respectively. The post-order Traversal is ..........

  1. Adbefacg
  2. Bdebfagc
  3. Cdbefcga
  4. Ddebfgca
Show answerHide answer

Correct answer: (D) debfgca

Explanation

Take the first node in preorder traversal a will be the root. Now we construct the binary tree Therefore, postorder is - debfgca

From UGC NET Computer Science PYQ, June 2015 (Paper II & III, Selected Questions)

This is question 8 of UGC NET Computer Science PYQ, June 2015 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.