Interview Question

Senior Software Engineer Interview Bellevue, WA

serialize and

reconstruct a binary tree

Interview Answer

1 Answer


If the tree is a binary search tree, we can serialize it by writing the pre-order traversal output to a file. Then to reconstruct the tree we read the file and insert the values in order.

RG on Mar 20, 2013

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up