Feedback for subjective question
Question 1: What is the functionality of the following method of BST class
TreeNode<int>* function(TreeNode<int>* tree) {
if( tree == NULL )
return NULL;
if( tree->getLeft() == NULL )
return tree; // this is it.
return function( tree->getLeft() );
}
TreeNode<int>* function(TreeNode<int>* tree) {
if( tree == NULL )
return NULL;
if( tree->getLeft() == NULL )
return tree; // this is it.
return function( tree->getLeft() );
}
Current Answer:
Be the first to post an answer to earn 100CR.