Amazon Interview Question

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