Re-Serialize a Binary Tree in Preorder

Company: Samsung

Difficulty: medium