Pergunta de entrevista da empresa Yahoo

Design an algorithm to serialize and deserialize a binary tree.