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]
3 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]3 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
What did creator Markus “Notch" Persson initially call his game
Veronika [31]

Answer:

Cave Game

Explanation:

Its initial Name was to be game cave in the developer phase and later changed to minecraft order of the stone and later changed to minecraft

7 0
3 years ago
Read 2 more answers
Students at a university are working on a project. The project involves many computing systems working together on disjointed ta
vitfil [10]
I think that C. cloud computing sounds like the best answer.
7 0
3 years ago
Read 2 more answers
What folder holds 32-bit programs installed in a 64-bit installation of windows?
raketka [301]
<span>C:\Program Files (x86) folder</span>
8 0
3 years ago
NumA = 3 <br>numB = 2<br>Result = numA ** numB
Paul [167]

Answer:

The result of the following code will be 9

Explanation:

There are several operators used in Python to do mathematical calculations.

** operator is used for exponents.

i.e.

a ** b mathematically means a^b

Here in the given code

3 is assigned to numA and 2 is assigned to numB

Result will be equal to 3^2

Hence,

The result of the following code will be 9

3 0
3 years ago
What is geometric constraint?​
Anit [1.1K]

a geometric constraint relates to other parts of a geometric figure. Geometric constraint defines dimensions of an object in computer aided design or CAD

8 0
3 years ago
Other questions:
  • 3. List and explain FIVE (5) types of services performed by<br>operating system?​
    11·2 answers
  • Which of the following statements about light-emitting diodes is correct
    11·1 answer
  • If Asa changes the text to bold, he has changed the style. True False
    8·2 answers
  • Write a class called Line that represents a line segment between two Points. Your Line objects should have the following methods
    8·1 answer
  • IoT is the interconnection of what?<br> Hardware<br> Networks<br> Everyday devices<br> Cables
    10·1 answer
  • What is Systems Engineering?
    5·1 answer
  • Usually written in block style with body text aligned along the left margin
    5·2 answers
  • What is Mobile Edge Computing? Explain in tagalog.​
    5·2 answers
  • Ang Kabihasnang ito ay umusbong sa rehiyon ng Timog Mexico
    6·1 answer
  • why is it important for software manufacturers to update their programs to work with the latest operating systems? compuscholar
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!