+1(805) 568 7317

i would prfer java implement linearsearch a key and binarysearch a key functions 1 r 4951887

i would prfer java implement linearSearch(a,key) and binarySearch(a,key)functions. 1. Request the user to enter a positive integer, and call it n.(n = 10^5 ) 2. Generate n random integers between -1000 to 1000 and savethem in array a. 3. Sort a (you can use any sorting algorithm you want. If youare using MATLAB, you can call the sort function to sort yournumbers) 4. Now to have the worst-case scenario, set the value of the keyto 5000 to make sure it does not exist in the array. 5. Run each function once to calculate the worst-case runningtime when n = 10^5 . 6. Calculate how much time your machine takes to run one singlestep 7. Now estimate the worst-case running time for each algorithmwhen n=10^7 6. Now repeat step 1-3 for n = 10^7 and compare the actualrunning time with your answer in step 5 Attached

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon

Order Now