subject
Computers and Technology, 29.06.2021 16:20 719729

By now you should be convinced that binary search requires fewer comparisons than linear search in both the worst case and the average case. However, keep in mind that binary search assumes that the elements are already in sorted order; if they’re not sorted, then it would take time to sort them before applying binary search, and sorting is a slow operation. Whereas the number of operations in the worst case to conduct binary search on a collection of N items is approximately {\log_2 N}log 2 ​ N, the number of operations required to sort N items is {N\log_2 N}Nlog 2 ​ N, i. e., the value of N times its base-2 logarithm. Assume you have an unsorted collection of N = 15 items, and you know you will need to make at least 10 searches and are concerned about the worst case. How would you determine whether it would be better to conduct 10 linear searches, or if it would be better to first sort the elements (which you only need to do once) and then conduct 10 binary searches? In making this decision, follow these steps: First, calculate the number of operations it would require to conduct 10 linear searches in the worst case. Then, calculate the number of operations it would require to sort the elements once; for simplicity, round {\log_2 15}log 2 ​ 15 up to 4. Last, calculate the number of operations it would require to conduct 10 binary searches in the worst case. Use the results of these three calculations to determine the answer.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:00
Chloe is building a kiosk-based excel application. she wants to make some modifications to the screen elements in order to keep users from being distracted by parts of the application that are irrelevant to her application. she turns to henry for guidance as she knows he built a similar solution earlier this year.chloe has decided to hide the worksheet gridlines and the vertical scroll bar. what does henry tell her to use to do this? a) screen elements dialog boxb) display options dialog boxc) customization dialog boxd) excel options dialog box
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
The computers in the sales department did not have enough data storage capacity to contain all the information the department needed to store, and it was taking a long time for team members to access the data they needed. to fix the problem, the technician installed new, larger hard drives on all the computers.
Answers: 1
You know the right answer?
By now you should be convinced that binary search requires fewer comparisons than linear search in b...
Questions
Questions on the website: 13722367