Question: 3. (10 points) Consider the following method. I/ input array a is not sorted public static int someMethod(int[] a) f return help (a,0,a. . length

 3. (10 points) Consider the following method. I/ input array a

3. (10 points) Consider the following method. I/ input array a is not sorted public static int someMethod(int[] a) f return help (a,0,a. . length 1) : 1 public static int help(int[] a, int 10 , int hi) i if (10m=hi) return a [10]; int mid =10+(hi10)/2; int L=heIp(a,10, nid ) : int R=help(a, midtl, hi ) : if (L>=R) return L : else return R : 1 a) (2pts) Given that input array a contains [3,1,5,9,0], after someMethod(a) is called, what is returned? (i.e., what is the output?) b) (6pts) What is the running time of the following someMethod() in the worst case? Requirement: Explain/show how you get the result. c) (2pts) Write the Oh notation for the numning time

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!