A simple 0 ms recursive solution without helper function
public void connect(TreeLinkNode root) {\n        if (root == null){\n            return;\n        }\n        \n        if (root.left != null){\n            roo
    public void connect(TreeLinkNode root) {\n        if (root == null){\n            return;\n        }\n        \n        if (root.left != null){\n            root.left.next = root.right;\n            if (root.next != null){\n                root.right.next = root.next.left;\n            }\n        }\n        \n        connect(root.left);\n        connect(root.right);\n    }
['Java']