Answer to Question #90855 in C++ for nozipho

Question #90855
write a c++ function which finds and returns the smallest node in binary search tree using recursion
1
Expert's answer
2019-06-17T05:40:03-0400
node* getSmallest(node* n) 
{        
  if (n == NULL)
    return NULL;        
  else if (n -> left == NULL)            
    return n;        
  else            
    return getSmallest(n -> left);    
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS