Amazon interview question

serialize and deserialize a binary tree