Question: Given a proper binary tree T, define the reflection of T to be the binary tree T such that each node v in T is

Given a proper binary tree T, define the reflection of T to be the binary tree T′ such that each node v in T is also in T′, but the left child of v in T is v’s right child in T′ and the right child of v in T is v’s left child in T′. Show that a preorder traversal of a proper binary tree T is the same as the postorder traversal of T’s reflection, but in reverse order.

Step by Step Solution

3.33 Rating (168 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Given a proper binary tree T the reflection of T is the binary tree T such that each node v in T is ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Data Structures And Algorithms In C++ Questions!