You are viewing a single comment's thread. Return to all comments →
Node * insert(Node * root, int data) { if (!root) { return new Node(data); } if (data < root->data) { root->left = insert(root->left, data); } else { root->right = insert(root->right, data); } return root; }
Seems like cookies are disabled on this browser, please enable them to open this website
Binary Search Tree : Insertion
You are viewing a single comment's thread. Return to all comments →