I am wrote a program that generates 20 random numbers from 1-99 and put them into an array. I am trying to sort them with a bucket sort, but I can't figure out how to do it. I have searched google and yahoo for information but everything I find just give me snip its of code. Which doesn't help me figure out how to put it into my code. I have a book but it covers every type of sort but a bucket sort. Please help me.

Re: Could someone please help me with a bucket sort. 80 80

Clickie. Bucket sort isn't as common of a term as you might think. It's actually more common to hear about variants such as radix sort.

Re: Could someone please help me with a bucket sort. 80 80

I am wrote a program that generates 20 random numbers from 1-99 and put them into an array. I am trying to sort them with a bucket sort, but I can't figure out how to do it. I have searched google and yahoo for information but everything I find just give me snip its of code. Which doesn't help me figure out how to put it into my code. I have a book but it covers every type of sort but a bucket sort. Please help me.

I assume by now that you've found the answer, but if not check out:
http://www.codecogs.com/d-ox/array/sort/bucketsort.php

Re: Could someone please help me with a bucket sort. 80 80

Please dont resurrect dead threads like a shaman.
Thread closed.

Re: Could someone please help me with a bucket sort. 80 80

I need a program on Bucket Sort in c++. Searched all over the internet but all the programs provided are not working!!

Re: Could someone please help me with a bucket sort. 80 80

Searched all over the internet but all the programs provided are not working!!

You could try to understand the algorithm and write your own, or strive to make the programs you found work...but that might be too much to expect from today's programming students who seem to want everything given to them.

Here's a better idea: start a new thread and ask for help in understanding the algorithm or fixing one of the supposedly broken programs you've found. But before you do that, read this article.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.