Question: Data Structure 6. Consider the following recursive method and BST pictured below public BSTNode mysteryMethod (BSTNodeKey, E> root) f if (root.left ()== null) return root;

Data Structure
Data Structure 6. Consider the following recursive method and BST pictured below
public BSTNode mysteryMethod (BSTNodeKey, E> root) f if (root.left ()== null) return

6. Consider the following recursive method and BST pictured below public BSTNode mysteryMethod (BSTNodeKey, E> root) f if (root.left ()== null) return root; return mysteryMethod(root.left()); \} (a) What node would be returned if the method is applied to the node with value 13? (b) In general, explain what this method does when applied to the root of a BST, What would be a better name for this method? (i.e., suggest a relevant name that indicates what it actually does.) 17. Suppose that the data below are stored in an array {3,6,0,7,4,1,9,5,2,8} Show the max-heap that results from running buildheap on this array. 18. [15 points] static > void inssort (E[] A) f for(int i=1;i0) \& & (A[j]. compareTo (A[j1])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!