You are viewing a single comment's thread. Return to all comments →
node * insert(node * root, int value) { if (root == NULL) { root = (node *)malloc(sizeof(node)); root->data = value; return root; } if (value < root->data) { root->left = insert(root->left, value); } else { root->right = insert(root->right, value); } return root; }
My solution
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 →
My solution