Amazon interview question

Serialize and deserialize a binary tree