[Python] Time O(n), Space O(1), Concise Real O(1) Solution
\nclass Solution:\n    def connect(self, root: \'Node\') -> \'Node\':\n        if (head:=root):\n            while (start:=root.left):\n                while ro
```\nclass Solution:\n    def connect(self, root: \'Node\') -> \'Node\':\n        if (head:=root):\n            while (start:=root.left):\n                while root:\n                    root.left.next = root.right\n                    root.right.next = root.next.left if root.next else None\n                    root = root.next\n                root = start\n        return head\n```
[]