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
Why does 5 g mm wave require more cells to achieve a better signal
umka2103 [35]

Answer:

Higher frequencies have a shorter range.

7 0
3 years ago
What does “default” refer to? the ability to be used as, or directly converted to, cash. the failure to pay back a loan. the amo
Vaselesa [24]
The answer is "the failure to pay back a loan".

In computer systems, we have a different meaning to the word default. It is referred to the setting or option in a computer upon opening a program or application. But according to the dictionary, default refers to the failure to make a payment such as a loan.
8 0
3 years ago
(1) Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Outpu
Alexeev081 [22]
No one is going to do this
4 0
3 years ago
Opposite word of reassembling​
Marysya12 [62]
<h3>OPPOSITE WORDS OF REASSEMBLING</h3>

  • disperse
  • disband
  • separate
8 0
3 years ago
Read 2 more answers
You have been asked to provide an account for an outside consultant, who needs limited access to the network for a very short pe
frutty [35]

Answer:

Guest account

Explanation:

When a consultant is accessing a network for a while and needs limited access to it, A Guest account should be given. This help keep your data and information save both now and in the future.

A guest account is an account with limited access and permission to a network over a specific period of time.

7 0
3 years ago
Other questions:
  • Can the redirection shell metacharacter be used to redirect between a command and another command?
    8·1 answer
  • What are the advantages of businesses using Twitter ?
    12·1 answer
  • _________ mode is similar to Cipher Feedback, except that the input to the encryption algorithm is the preceding DES output. A.
    11·1 answer
  • What permission do users have by default regarding printer access and the ability to manage documents?
    14·1 answer
  • According to what theory did the universe expand explosively into existence 13.7 billion years ago?
    13·2 answers
  • Using your own words, explain how third-party cookies are created. Suppose you are an ad-serving company, and you maintain a log
    9·1 answer
  • Which statement about parallax scrolling is true?
    6·1 answer
  • What is the output of the following program?
    11·2 answers
  • Which line is most likely an error? A-“hello” B-hello C-“100” D-100
    6·2 answers
  • List out any four hardware and software components required for multimedia​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!