Amazon interview question

Serialize and deserialize binary tree