Serialize and Deserialize Binary tree