Answer:
Let the function be Node* ins(Node *root,int k)
if root node is NULL then return new node with data equal to k.
If the k <root->data
root->left=ins(root->left,k);
else if k >root->data
root->right =ins(root->right,k);
At last return root.
Explanation:
Node is always inserted at the at the leaf node.We will search k in the tree if we hit a the leaf node the new node is inserted as the child of the leaf node.
Answer:
11 & 99
Explanation:
if (number > 10 && number < 100 )
if number is 11 to 99
if user press any number in between them or 11 , 99
then cout will be
"That number is acceptable ."