User talk:MichaelChrisco: Difference between revisions

Content added Content deleted
mNo edit summary
No edit summary
Line 1: Line 1:
Thanks for squelching that spam. (Google Translate says it was some kind of advert for a Russian factory. Inappropriate for here for sure.) –[[User:Dkf|Donal Fellows]] 08:41, 27 July 2010 (UTC)
Thanks for squelching that spam. (Google Translate says it was some kind of advert for a Russian factory. Inappropriate for here for sure.) –[[User:Dkf|Donal Fellows]] 08:41, 27 July 2010 (UTC)
:ya no kidding. Your welcome.
:ya no kidding. Your welcome.

===Bead sort: a Unique Solution===


Ive been working on an elegant solution to a paper I found on the internet. Its called Bead-sort http://en.wikipedia.org/wiki/Bead_sort. I am not sure that this is an original idea but I seem to have implemented it in C++. Why C++.....because I couldn't do it in Newlisp (yet!). I think that the elegance of this algorithm is cool (as it was an A HA!! moment for me). It uses a distribution algorithm to distribute the "beads" one at a time though "buckets". These buckets, in turn, are the accumulators (or the after affects of gravity on bead sort).
Ive been working on an elegant solution to a paper I found on the internet. Its called Bead-sort http://en.wikipedia.org/wiki/Bead_sort. I am not sure that this is an original idea but I seem to have implemented it in C++. Why C++.....because I couldn't do it in Newlisp (yet!). I think that the elegance of this algorithm is cool (as it was an A HA!! moment for me). It uses a distribution algorithm to distribute the "beads" one at a time though "buckets". These buckets, in turn, are the accumulators (or the after affects of gravity on bead sort).
Line 10: Line 12:
<lang cpp>
<lang cpp>


//this algorithm only works with posative, whole numbers. It can be made to work with other numbers but the performance would be horrific.
//this algorithm only works with positive, whole numbers. It can be made to work with other numbers but the performance would be horrific.
//its a proof of concept. For actual sorting, it probably has worse time and space complexity than some algorithms.
//its a proof of concept. For actual sorting, it probably has worse time and space complexity than some algorithms.
//O(n) time complexity where n is the summation of the whole list to be sorted.
//O(n) time complexity where n is the summation of the whole list to be sorted.