Amazon interview question

The question asked was a Leetcode deserialize serialize the tree.