Write a function to serialize and deserialize a binary tree.
HardProblem Statement
Write a function to serialize and deserialize a binary tree.
Sample Input
Binary tree: 1 / \ 2 3 / \ 4 5
Sample Output
Serialized Tree: 1,2,null,null,3,4,5,null,null,null,null Deserialized Tree Root: 1
Limits
Time: 2s · Memory: 256 MB