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.

On this platform the tree is supplied as a packed level-order listing of its node values. Children are assigned in breadth-first order and the input carries no null placeholders, so an absent child simply does not appear. The result is the trimmed level-order listing produced by serializing the tree that was rebuilt from the input listing, which means a correct solution performs a genuine serialize and deserialize round trip and returns the original listing.

Examples
Input: [[1,2,3,4,5,6,7]]
Output: [[1,2,3,4,5,6,7]]
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.