Python, BFS > 90%
\nclass Codec:\n\n    def serialize(self, root: TreeNode) -> str:\n        """Encodes a tree to a single string.\n        """\n        if not root: return \'\'\
```\nclass Codec:\n\n    def serialize(self, root: TreeNode) -> str:\n        """Encodes a tree to a single string.\n        """\n        if not root: return \'\'\n        tree = []\n        queue = deque([root])\n        while queue:\n            node = queue.popleft()\n            if node:\n                tree.append(str(node.val))\n                queue.extend([node.left, node.right])\n            else:\n                tree.append(\'*\')\n        return \',\'.join(tree)\n        \n\n    def deserialize(self, data: str) -> TreeNode:\n        """Decodes your encoded data to tree.\n        """\n        if not data: return None\n        tree = deque(data.split(\',\'))\n        root = TreeNode(int(tree.popleft()))\n        queue = deque([root])\n        while queue:\n            node = queue.popleft()\n            \n            if (left := tree.popleft()) != \'*\':\n                node.left = TreeNode(int(left))\n                queue.append(node.left)\n            \n            if (right := tree.popleft()) != \'*\':\n                node.right = TreeNode(int(right))\n                queue.append(node.right)\n                \n        return root\n```
['Breadth-First Search', 'Python', 'Python3']