[LeetCode] Serialize and Deserialize Binary Tree
The serialization and deserialization both use the BFS traversal. The code is as follows.
I adopt a way similar to that of the OJ to serialize the binary tree. For the following tree, my serialization result is "1,2,3,null,null,4,5," (note the last comma).