Amazon Interview Question

tree serialize and deserialize