C++ easy recursive solution
class Solution {\n    public:\n        void connect(TreeLinkNode *root) {\n            if(!root)\n                return;\n            if(root->left)\n         
    class Solution {\n    public:\n        void connect(TreeLinkNode *root) {\n            if(!root)\n                return;\n            if(root->left)\n                root->left->next = root->right;\n            if(root->next && root->right)\n                root->right->next = root->next->left;\n            connect(root->left);\n            connect(root->right);\n        }\n    };
[]