Design an algorithm to serialize a binary tree to a string and deserialize that string back into an identical tree. You choose the format; the only requirement is that deserialize(serialize(root)) reproduces the original tree. Implement a class Codec with serialize(root) and deserialize(data) . TreeNode is predefined. Input format A tree as a level-order array with nulls, e.g. [[1,2,3,null,null,4,5]] . The harness builds it, round-trips it through your codec, and checks the result matches.