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
White raven [17]
3 years ago
9

Suppose that, on average, a certain binary search algorithm takes one second to search through 1,000 items. Approximately how lo

ng will this algorithm take to search through 4,000 items?
Computers and Technology
1 answer:
spayn [35]3 years ago
4 0

Answer:

4 seconds

Explanation:

If the binary search algorithm takes one second to search through 1000 items then, to get the time taken to search through 4000 items should be one second multiplied by 4.

Since

1000 items = 1 second

4000 items = y

-we cross multiply, we have

1000 items x y =4000 items x 1 second

-divide both sides by 1000 items to obtain the value of y, we have

y = (4000 items x 1 second) / 1000 items

y = 4 seconds.

You might be interested in
Can you tell me what is rast
Sholpan [36]
A radioallergosorbent test is a blood test using radioimmunoassay test to detect specific IgE antibodies, to determine the substances a subject is allergic to. This is different from a skin allergy test, which determines allergy by the reaction of a person's skin to different substances.
3 0
3 years ago
Please choose the correct answer please tell fast​
pav-90 [236]

Answer:

the answer might be 2......

7 0
3 years ago
Consider a company that needs to sort an array of structures of type Customer by balance, with the largest balance first. Here i
8090 [49]

Answer:

#include <iostream>

#include <string>

#include <cstring>

#include <cstdlib>

using namespace std;

struct Person

{

string name;

int age;

};

int main()

{

struct Person data[10];

struct Person *pData[10],*temp;

string names[] = {"a","b","c","g","z","l","p","q","r","w"};

int num[] = {4,6,34,8,13,90,33,22,18,23};

for(int i=0;i<9;i++)

{

data[i].name = names[i];

data[i].age = num[i];

pData[i] = &data[i];

}

for(int i=0;i<9;i++)

{

for(int j=i+1;j<9;j++)

{

if(pData[i]->name.compare(pData[j]->name)>0)

{

temp = pData[i];

pData[i] = pData[j];

pData[j] = temp;

}

}

}

for(int i=0;i<9;i++)

{

cout<<pData[i]->name<<" "<<pData[i]->age<<endl;

}

}

Explanation:

The line #include <iostream> initializes the program.

This program created an array of only 10 structures, Customer data. Also defined an auxiliary array Customer *pData.

The program uses these parameters to sorts the array of pointers so that when you go through pData in increasing order of index k, the entries pData[k] point to Customer objects in decreasing order by balance, meaning that pdata[0] now points to the customer with the highest balance, and pData[9] points to the customer with the smallest balance.

4 0
3 years ago
Please someone help!!!!
Montano1993 [528]

Answer:

do what the directions say and you should be able to figure out the answer if not contact me through brainly

Explanation:

3 0
3 years ago
Insert a row above the selected row
anastassius [24]
I cants see the "Selected Road" And I cant answer this unless you put that up. Sorry.
6 0
4 years ago
Read 2 more answers
Other questions:
  • Who is typically considered to be the father of computing
    6·1 answer
  • There are ways to perform computer commands quickly and multiple times. <br> a. True <br> b. False
    11·2 answers
  • How much electricity is in the human brain? ​
    8·2 answers
  • Analyze the following code. Number[] numberArray = new Integer[2]; numberArray[0] = new Double(1.5); Question 9 options: A) Sinc
    13·1 answer
  • We will pass in a value N. Write a program that outputs the complete Fibonacci sequence for N iterations. Important: If N is 0,
    13·1 answer
  • Toby has lost valuable data on his computer a number of times due to system crashes caused by viruses. He decides to invest in a
    13·1 answer
  • What does the revolver do computer science​
    9·1 answer
  • Who invented the Bluetooth device​
    12·1 answer
  • Question 1 (1 point)
    9·1 answer
  • Mention the usage of crop concept in ms-word​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!