0

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.

Edited by deceptikon: Closed flag got unset after migration to a new system

6
Contributors
5
Replies
6
Views
12 Years
Discussion Span
Last Post by deceptikon
0

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.

0

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

0

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

0

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.