Question: Help with part A) questions 1-10 Date Turned in: Purpose: To demonstrate your understanding of analyzing algorithms. Starting with this assignment, only the testing needs
Date Turned in: Purpose: To demonstrate your understanding of analyzing algorithms. Starting with this assignment, only the testing needs to be on empress.csusm.edu A Review Questions 1 pt per question-10ptsYour score is Type your answers here 1) What does W(n) mean? (W? N? W()?) 2) A. What is W(n) of sequential search? I B. When does it happen? 3) What does B(n) mean? (B?, N?, B(N)?) 4) A. What is B(n) of sequential search? B. When does it happen? 5) Why is A(n) difficult to determine for the real world problems? 6) Why don't we care about constants and lesser terms in a time complexity expression? 7) Prove that 3nA2 +4n O(n42) as I did in the notes. 8) Binary search corresponds to the binary decision tree. tree. Sequential search corresponds to a 9) Thus, the fastest ordered list search does W(n)-Theta(???) comparisons. 10) But, the fastest unordered list search does W(n)-Theta(???) comparisons. B) Programming Binary Search 110 pts) No ADT; Just one source code file - Run my solution program first Your score is: Using Notes-3B.doc, implement and test the binary search function. The pseudo code in the file does not take care of the cases where the element is not found. You must fix the code to take care of such cases and return -1. Your main0 will fill an array of 10 slots with integers 1 3579 11 13 15 17 19 It will then ask the user to enter a number to look for. It will then call binarySearch and display the returned result. e.g. "The number was found in position 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
