Pregunta de entrevista de Amazon

Provide two algorithms: one to serialize a binary tree, the other to deserialize it.