Hard
094Serialize and Deserialize Binary Tree
Given a binary tree encoded as level-order with -100000 as null, return the canonical serialized level-order encoding after deserialize/serialize.
EXAMPLES
Example 1
Input
{
"root": [
1,
2,
3,
-100000,
-100000,
4,
5
]
}
Output
[
1,
2,
3,
-100000,
-100000,
4,
5
]FUNCTION SHAPE
root: intArray→intArray