Bucket Sort Implementation

There is no decent Implementation of Bucket Sort out there!

Page 1 of 1

3 Replies - 11117 Views - Last Post: 02 June 2010 - 08:55 PM Rate Topic: -----

#1 Guest_Alex Soto*


Reputation:

Bucket Sort Implementation

Posted 02 June 2010 - 08:18 PM

Hi Guys, I've recently been handed a project in which I need to compare processes and threads. To do this, I run various sorting algorithms and check their running time. Anyways, one of them is bucket sort... I have never really understood bucketsort but now that I try and find a decent implementation to run it, it amazes me that there is not one around the web. I have tried implementing it myself but with no luck (never been a fan of that whole math/logic area) I keep running into segmentation faults etc.

Anyways, I would really appreciate if anyone found or has an implementation of bucketsort for arrays.

I can also post my code if anyone would be willing to check it out for errors but I'd rather not because I think its pretty lousy.. hehe...

Any help is greatly appreciated! Thanks!

Is This A Good Question/Topic? 0

Replies To: Bucket Sort Implementation

#2 eker676  Icon User is offline

  • Software Engineer
  • member icon

Reputation: 378
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: Bucket Sort Implementation

Posted 02 June 2010 - 08:28 PM

Does this help?

http://www.brpreiss....tml/page74.html
Was This Post Helpful? 0
  • +
  • -

#3 Guest_Alex Soto*


Reputation:

Re: Bucket Sort Implementation

Posted 02 June 2010 - 08:34 PM

View Posteker676, on 02 June 2010 - 07:28 PM, said:



I'll try it out right now, I had found that page before but I didn't understand it right away so I kept searching. But now I think that I've spent enough time on this and am ready to move on so I'm ready to try anything, I'll post back as soon as I get it running!
Was This Post Helpful? 0

#4 Guest_Alex Soto*


Reputation:

Re: Bucket Sort Implementation

Posted 02 June 2010 - 08:55 PM

View Posteker676, on 02 June 2010 - 07:28 PM, said:



Yes, it works, its not ideal because it creates as many buckets as unique instances of a number there could be (max-min buckets) but I guess this one is better than a non-working ideal one haha...

Thanks a lot for your fast response!
Cheers!
Was This Post Helpful? 0

Page 1 of 1