1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
AVprozaik [17]
3 years ago
13

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. Demonstrate which option gives better expected performance. Does this change if linear search on an unsorted array is used instead of binary search for both options
Computers and Technology
1 answer:
vladimir2022 [97]3 years ago
7 0

Answer:

The answer is "binary search= 5.111 and Linear seacrch= 6400".

Explanation:

Following are the description of this question:

  • Binary Search-The performance with single arrays is log 10000 = 4, through the use of two arrays (60/100)*log4000 + (40/100)*(log4000 + log6000) = 5.111.  
  • In the linear search: while doing static searches, 10000 would be performed, and (60/100)*4000 + (40/100)*6000 = 6400 will be used with two arrays.  
  • It's a special case, that will be used in one of the arrays in a binary search. Whereas good case uses linear frames, two frames are used, as indicated above.
You might be interested in
Reading is the process of transferring data, instructions, and information from memory to a storage medium.
maksim [4K]
True, the computer will read from, say, a blu-ray and then transfer it to your RAM to before writing it to your hard drive and then, through the various other wonders of computers, it can be displayed on your monitor.
8 0
4 years ago
After you set a goal or purpose for your Web site, what is the next step to designing your​ pages​?
Hatshy [7]

Answer:

et your goal.

Choose a website builder.

Define your layout.

Claim your domain name.

Gather your content.

Add the right pages.

Design your website elements.

Pick the professional tools you need.

Explanation:

7 0
3 years ago
write a program in pseudo code to solve the following: covert a temperature input in degrees Celsius to degrees Fahrenheit and d
Tomtit [17]

Answer:

Program Start:

Declare Variables: Celsius and Fahrenheit as float

Input Celsius

Fahrenheit = (Celsius * 9/5) + 32

Print Celsius

Print Fahrenheit

End Program

Explanation:

Pseudo codes are false codes and are used to mimic actual programs.

So, the interpretation of the above code is as follows:

This line indicates the start of the program

Program Start:

The variables are declared, here

Declare Variables: Celsius and Fahrenheit as float

This line gets input for degree Celsius

Input Celsius

This line converts degree Celsius to Fahrenheit

Fahrenheit = (Celsius * 9/5) + 32

The next two lines print the degree Celsius and the equivalent degree Fahrenheit

Print Celsius

Print Fahrenheit

This indicates end of program

End Program

5 0
3 years ago
Label the parts of the plated salad.
sesenic [268]

Answer:

   3. Base (<em>under line</em>): usually a layer of salad greens that line the plate or bowl in which the salad will be served.

   2. Body (<em>main part</em>): consists of the main ingredients.

   1. Garnish: enhances the appearance while also complementing the overall taste; must be edible.

Dressing: liquid/ semi-liquid added to the body.

Explanation:

3 0
2 years ago
CHALLENGE ACTIVITY 7.3.1: Functions: Factoring out a unit-conversion calculation. Write a function so that the main() code below
77julia77 [94]

Answer:

See Explaination

Explanation:

#include <stdio.h>

MphAndMinutesToMiles()

{

double milesPerHour;

double minutesTraveled;

double hoursTraveled;

double milesTraveled;

scanf("%lf", &milesPerHour);

scanf("%lf", &minutesTraveled);

hoursTraveled = minutesTraveled / 60.0;

milesTraveled = hoursTraveled * milesPerHour;

printf("Miles: %lf\n", milesTraveled);

}

int main()

{

MphAndMinutesToMiles();

return 0;

}

4 0
3 years ago
Other questions:
  • A ________ is a small text file passed to a web browser on a user's computer by a web server.
    7·1 answer
  • You can advance slides during a slideshow by pressing the page down key
    7·1 answer
  • Which keyboard feature is a form feed character?
    15·1 answer
  • 5. Write a 500- to 1,000-word description of one of the following items or of a piece of equipment used in your field. In a note
    13·1 answer
  • Technician A says that automotive engine blocks are usually classified by the number of cylinders the block. Technician B says t
    9·1 answer
  • Which formula is a complex formula?<br> =D6/E10<br> =10-(A3-D13)<br> =C3+10+E3<br> =5+A1*B1
    12·2 answers
  • Are scripted languages easier or more difficult to port than programming languages? Why?
    6·1 answer
  • Which method will return the first element in an ArrayList employees?
    5·1 answer
  • 4. Why does Hancock believe that our communication online is more honest than we might<br> expect?
    15·2 answers
  • Cheri's teacher asked her to write a program using the input() function. What will this allow her program to do?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!