Serialize and Deserialize Binary Tree

Design an algorithm to serialize a binary tree to a string and deserialize it back to the original tree structure.

Examples
Input: [1,2,3,null,null,4,5]
Output: [1,2,3,null,null,4,5]
Hints

Serialize and Deserialize Binary Tree

Design an algorithm to serialize a binary tree to a string and deserialize it back to the original tree structure.