Frage im Vorstellungsgespräch bei Amazon

Serialize/ Deserialize a binary tree.

Antwort im Vorstellungsgespräch

Anonym

3. März 2014

Need to use a queue to keep track of the present element you are deserializing. Cannot use the standard approach of using inorder/preorder traversal as in BST as binary tree values are not distinct and search function wont work properly.