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
kari74 [83]
4 years ago
9

You can sort a large array of integers that are in the range 1 to 100 by using an array count of 100 items to count the number o

f occurrences of each integer in the array. Fill in the details of this sorting algorithm, which is called a bucket sort, and write a C function that implements it. What is the order of the bucket sort
Computers and Technology
1 answer:
olga55 [171]4 years ago
3 0

Answer:

See explaination

Explanation:

#include<iostream>

using namespace std;

void bucketSort(int arr[],int size)

{

int count[101]={0};

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

count[arr[i]]++;

int k=0;

for(int i=1;i<=100;i++)

{

while(count[i]>0)

{

arr[k++]=i;

count[i]--;

}

}

}

int main()

{

int arr[]={1,2,5,4,3,9,8,7,6};

bucketSort(arr,9);

for(int i=0;i<9;i++)cout<<arr[i]<<" ";

cout<<"\n";

}

You might be interested in
X = 9 % 2<br><br> if (x == 1):<br>   print ("ONE")<br> else:<br>   print ("TWO")
Alex73 [517]
The output will be : ONE
5 0
3 years ago
Read 2 more answers
One of your clients is looking into investing in direct participation programs. He is examining several different types of progr
Alisiya [41]

Answer:

<em>Exploratory drilling program </em>

Explanation:

To assess the physical properties and limits of a reservoir exploratory drilling is the initial phase of drilling.

Exploratory drilling projects <em>have significant write-offs offset by low mineral and land-related costs. Mineral and land rights are less expensive because they mine in unproven deposits.</em>

8 0
3 years ago
What phone had emojis first?
irina1246 [14]
I believe it was IPhone
3 0
3 years ago
Read 2 more answers
With which type of satellite is there a propagation delay?
Flauer [41]

Geostationary satellites have a high propagation delay.

8 0
3 years ago
1.what is a computer?
Amanda [17]
1. an electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program.
2. a peripheral device, as a keyboard or stylus, used to enter data into a computer for processing.
3. Output is defined as the act of producing something, the amount of something that is produced or the process in which something is delivered. An example of output is the electricity produced by a power plant. An example of output is producing 1,000 cases of a product.

4. A system unit is the part of a computer that houses the primary devices that perform operations and produce results for complex calculations. It includes the motherboard, CPU, RAM and other components, as well as the case in which these devices are housed.
8 0
3 years ago
Other questions:
  • The following code in a different program is not working properly. The message should display the value of the intCounter variab
    14·1 answer
  • Nonverbal communication relies on _________________. a. multiple channels b. continuous feedback c. ambiguous interpretation d.
    9·1 answer
  • A hierarchical addressing scheme is used
    15·1 answer
  • The term____relates to all things that we see.
    13·1 answer
  • 1. ________ is often defined as using illicit (illegal) drugs, or when the drug is alcohol, tobacco, or a legitimate drug (presc
    13·1 answer
  • Henry is planning to visit Spain for a vacation. He wants to learn Spanish, but he prefers to do it in a fun way. He searches on
    8·2 answers
  • Add the following numbers in abacus 2436+9214​
    8·1 answer
  • Difference between customized and packaged software​
    10·1 answer
  • Responsible manner in video and audio conferencing​
    15·1 answer
  • you are pairing a bluetooth headset to a mobile device. on the device, after finding the device for pairing, what is the next st
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!