Design an algorithm to serialize (convert to string) and deserialize (convert back) a binary tree. Use preorder traversal with null markers.
root = [1,2,3,null,null,4,5]
[1,2,3,null,null,4,5]