Chapter 9: Problem 9
In a binary search, after three comparisons have been made, only ________ of the array will be left to search.
Chapter 9: Problem 9
In a binary search, after three comparisons have been made, only ________ of the array will be left to search.
All the tools & learning materials you need for study success - in one app.
Get started for freeThe _________ search algorithm requires that the array’s contents be sorted.
Bubble sort places ________ number(s) in place on each pass through the data.
Assume an array of structures is in order by the customerID field of the record, where customer IDs go from 101 to 500 . A) Write the most efficient pseudocode algorithm you can to find the record with a specific customerID if every single customer ID from 101 to 500 is used and the array has 400 elements. B) Write the most efficient pseudocode algorithm you can to find a record with a customer ID near the end of the IDs, say \(494,\) if not every single customer ID in the range of 101 to 500 is used and the array size is only 300 .
The _________ search algorithm steps sequentially through an array, comparing each item with the search value.
Assume that empName and empID are two parallel arrays of size numEmp that hold employee data. Write a pseudocode algorithm that sorts the empID array in ascending ID number order (using any sort you wish), such that the two arrays remain parallel. That is, after sorting, for all indexes in the arrays, empName [ index ] must still be the name of the employee whose ID is in empID [ index ].
What do you think about this solution?
We value your feedback to improve our textbook solutions.