vector printNearNodes(Node *root, int low, int high)
{
vector vp;
if(root->data>=low)
printNearNodes(root->left,low,high);
if(root->data>=low && root->data<=high)
{
vp.push_back(root->data);
}
printNearNodes(root->right,low,high);
return vp;
}
what would be the case base
please help me, I don’t want more function, i want this function should be sufficient