In function :
node* insert_in_tree(int number,node* p_tree) {
if(p_tree == 0) {
node* newNode = new node;
newNode->num = number;
newNode->p_left = 0;
newNode->p_right = 0;
return newNode;
}
if(number < p_tree->num) {
p_tree->p_left = insert_in_tree(number,p_tree->p_left);
}
else {
p_tree->p_right = insert_in_tree(number,p_tree->p_right);
}
return p_tree; // refering to this
}
in return p_tree is it returning newly created node, or a root node ?