0% found this document useful (0 votes)
7 views

Unit IV - Reconstruction of Binary Tree - Pps

Uploaded by

raghvendrac210
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Unit IV - Reconstruction of Binary Tree - Pps

Uploaded by

raghvendrac210
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Reconstruction of Binary

Tree
 The original tree cannot be reconstructed,
given its inorder, preorder or postorder
traversal alone.
 If sequence of nodes produced by inorder
and postorder traversal of a binary tree are
provided then a unique binary tree can be
reconstructed.

Trees Unit III. 1 Dr. Rabins Porwal


Example
 Inorder: HDIJEKBALFMCNGO
 Postorder: HIDJKEBLMFNOGCA

A
HDIJEKB LFMCNGO
B C
HIDJKEB LMFNOGC
HDIJEK LFM NGO
E F G
HIDJKE LMF NOG

HDIJ K L M N O
J K
HIDJ K

HDI
D
HID
H I

Trees Unit III. 2 Dr. Rabins Porwal

You might also like