Answers to Chapter 12 Review Questions -------------------------------------- 4. Linear Search: start at the beginning of the array and examine each element until you find the one you're looking for. Binary Search: first make sure the array has been sorted (e.g., in increasing order). Then examine the middle element of the array to determine if what you're looking for is in the first or second half of the array. Wherever it is, repeat the above by examining the middle element of that half. Keep going until you find what you're looking for. 5. True 6. Binary search requires that the array be sorted. 8. Yes, the function would still work correctly. Once the first n-1 elements have been correctly positioned, the remaining element (which is now guaranteed to be the largest) must also be in the correct position. 10. An algorithm is "quadratic" if the time required to execute it grows in proportion to the square of the size of the input. In other words, an algorithm is quadratic if it has running time O(n^2).