// Serialize and Deserialize Binary Tree — HARD
// Category: tree
Design an algorithm to serialize and deserialize a binary tree.
Serialization is the process of converting a tree to a string; deserialization is the reverse.
Implement two functions:
- `serialize(root)` — returns a string representation of the tree
Example: root = [1,2,3,null,null,4,5]
Output: [1,2,3,null,null,4,5]