今際の国の呵呵君
Saturday, October 21, 2017
[LeetCode]Serialize and Deserialize Binary Tree
可以参考
Construct String From Binary Tree
和
Construct Binary Tree From String
的思路,代码如下:
另外我们也可以用题目给的思路来序列化,也就是层序遍历,代码如下:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment