subject

A company database consists of 10,000 sorted names, 40% of whom are known as good customers and who together account for 60% of the accesses to the database. There are two data structure options to consider for representing the database: • Put all the names in a single array and use binary search.
• Put the good customers in one array and the rest of them in a second array. Only if we do not find the query name on a binary search of the first array do we do a binary search of the second array.

Required:
a. Demonstrate which option gives better expected performance.
b. Does this change if linear search on an unsorted array is used instead of binary search for both options?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:30
In deadlock avoidance using banker’s algorithm, what would be the consequence(s) of: (i) a process declaring its maximum need as maximum possible for each resource. in other words, if a resource a has 5 instances, then each process declares its maximum need as 5. (ii) a process declaring its minimum needs as maximum needs. for example, a process may need 2-5 instances of resource a. but it declares its maximum need as 2.
Answers: 3
question
Computers and Technology, 24.06.2019 01:00
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
question
Computers and Technology, 24.06.2019 19:00
Luis is cloud-based( microsoft bot framework). true false
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
What are the 4 basic items that are traded throughout the world?
Answers: 1
You know the right answer?
A company database consists of 10,000 sorted names, 40% of whom are known as good customers and who...
Questions
question
Mathematics, 18.01.2021 20:00
question
Mathematics, 18.01.2021 20:00
question
Mathematics, 18.01.2021 20:00
question
Engineering, 18.01.2021 20:00
question
Mathematics, 18.01.2021 20:00
question
Chemistry, 18.01.2021 20:00
question
Arts, 18.01.2021 20:00
question
Mathematics, 18.01.2021 20:00
question
Mathematics, 18.01.2021 20:10
Questions on the website: 13722363