[JAVA] Clean Code, O(N) Time Complexity, 100% Faster Solution
\n/*\n// Definition for a Node.\nclass Node {\n    public int val;\n    public Node left;\n    public Node right;\n    public Node next;\n\n    public Node() {}
```\n/*\n// Definition for a Node.\nclass Node {\n    public int val;\n    public Node left;\n    public Node right;\n    public Node next;\n\n    public Node() {}\n    \n    public Node(int _val) {\n        val = _val;\n    }\n\n    public Node(int _val, Node _left, Node _right, Node _next) {\n        val = _val;\n        left = _left;\n        right = _right;\n        next = _next;\n    }\n};\n*/\n\nclass Solution {\n    public Node connect(Node root) {\n        \n        if (root == null || root.left == null) {\n            return root;\n        }\n        \n        root.left.next = root.right;\n        if (root.next != null) {\n            root.right.next = root.next.left;\n        }\n        \n        connect (root.left);\n        connect (root.right);\n        \n        return root;\n    }\n}\n```\n\nPlease help to **UPVOTE** if this post is useful for you.\nIf you have any questions, feel free to comment below.\n**HAPPY CODING :)\nLOVE CODING :)**
[]