Frage im Vorstellungsgespräch bei Expedia Group

serialize and reconstruct a binary tree

Antwort im Vorstellungsgespräch

Anonym

21. März 2013

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.