Another simple JavaScript solution
Since it's a full binary tree, our job is much simpler, at each node, connects its left and right child, and try to connect the right child with the left child 
Since it's a full binary tree, our job is much simpler, at each node, connects its left and right child, and try to connect the right child with the left child of node's next. A simple preorder traversal should be able to help us solve this problem.\n```\n/**\n * @param {TreeLinkNode} root\n * @return {void} Do not return anything, modify tree in-place instead.\n */\nvar connect = function(root) {\n    if (!root || !root.left) { // sanity check\n        return;\n    }\n    \n    root.left.next = root.right;                         // connect left -> right\n    root.right.next = root.next ? root.next.left : null; // connect right -> next's left\n    \n    connect(root.left);\n    connect(root.right);\n};\n```\nTime complexity: `O(n)`\nSpace complexity: `O(1)`
[]