simple javascript solution
\nlet serialize = (root, result = []) => {\n  if (root) {\n    result.push(root.val);\n    result.push(...serialize(root.left));\n    result.push(...serialize(r
```\nlet serialize = (root, result = []) => {\n  if (root) {\n    result.push(root.val);\n    result.push(...serialize(root.left));\n    result.push(...serialize(root.right));\n  } else {\n    result.push(null);\n  }\n  return result;\n};\n\nlet deserialize = (data) => {\n  let val = data.shift();\n  if (val == null) return null;\n  let node = new TreeNode(val);\n  node.left = deserialize(data);\n  node.right = deserialize(data);\n  return node;\n};\n```\n\nSee more @ https://github.com/osdevisnot/leetcode
['JavaScript']