Design an algorithm to serialize and deserialize a binary tree.
String serialize(TreeNode root)— encodes the tree to a string.TreeNode deserialize(String data)— decodes the string back to the tree.
There is no restriction on your serialization/deserialization algorithm.
Example:
Input: root = [1,2,3,null,null,4,5] Output: [1,2,3,null,null,4,5]