logo

Crowdly

Browser

Add to Chrome

Consider the following function:  function  F(root,x)        if  (root...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Consider the following function:

 function F(root,x) 

     if (root!=NULL) 

          if (x == root->data) 

   

         

print('root')

           else 

               if (x< root->data) 

     

                

print('left')

                     F(root->left,x) 

               else 

 

                   

print(`right')

                    F(root->right,x) 

   else 

       print ('---')

end function

After

inserting the following numbers in a BST (in this order): 4, 2, 1, 3, 7, 5; function F was executed and the following data was print on screen:

left

left 

left     

---

What number was entered as input argument to this function? 

0%
0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on learn.gold.ac.uk?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome