Let T be an ordered tree with more than one node. Is it possible that the preorder

Question:

Let T be an ordered tree with more than one node. Is it possible that the preorder traversal of T visits the nodes in the same order as the postorder traversal of T? If so, give an example; otherwise, explain why this cannot occur. Likewise, is it possible that the preorder traversal of T visits the nodes in the reverse order of the postorder traversal of T? If so, give an example; otherwise, explain why this cannot occur.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Data Structures and Algorithms in Java

ISBN: 978-1118771334

6th edition

Authors: Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser

Question Posted: