Amazon interview question

design a serialize/deserialize a binary tree into a string.