Question: CYULLA LUCE 2. If a linear search function is searching for a value that is stored in the last element of a 10,000-element array, how
CYULLA LUCE 2. If a linear search function is searching for a value that is stored in the last element of a 10,000-element array, how many elements will the search code have to read to locate the value? 3. In an average case involving an array of N elements, how many times will a linear search function have to read the array to locate a specific value? 4. A binary search function is searching for a value that is stored in the middle element of an array. How many times will the function read an element in the array before finding the value? 5. What is the maximum number of comparisons that a binary search function will make when searching for a value in a 1,000-element array? 6. Why is the bubble sort inefficient for large arrays? 7. Why is the selection sort more efficient than the bubble sort on large arrays? Fill-in-the-Blank 8. The search algorithm steps sequentially through an array, comparing each item with the search value. 9. The search algorithm repeatedly divides the portion of an array being searched in half. 10. The search algorithm is adequate for small arrays but not large arrays. 11. The search algorithm requires that the array's contents be sorted. 12. If an array is sorted in order, the values are stored from lowest to highest. 13. If an array is sorted in order, the values are stored from highest to lowest
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
