← 返回 apple 的题目列表Serialize and Deserialize Binary Tree
类型:qbank
Implement an algorithm to serialize and deserialize a binary tree.
Examples
Example 1:
Input: root = [1,2,3,null,null,4,5]
Output: [1,2,3,null,null,4,5]
Example 2:
Input: root = []
Output: []
Constraints
0 <= The number of nodes in the tree <= 1000
-1000 <= Node.val <= 1000