Categories
software engineering

Sorting Algorithm

I don’t usually blog like this, but I had a semi-moment of inspiration, only being semi- because it might be complete crap.

Well, I was thinking about sorting when I thought about using math to quicken the process. This most obviously works with numbers, though I think it can be used for other stuff as well.

Basically,

1) Calculate the mean of the array
2) Find the standard deviation of each member
3) Using that number, put it into a general position in a new array, as its SD should give a general percent of where it goes
4) Deal with collisions by sliding left or right to a new position, or in some more ingenious way

After that, it can either go down as a divide-and-conquer, or just be a general sort for an insertion sort to follow or something.

So: incorrect, unusable, already thought of, or a combination of those?

2 replies on “Sorting Algorithm”

honestly never thought of using SD in an array sort. But I being the foremost authority on the matter, you should trust me completely.

sounds cool.

Pretty good. I actually started coding it, but realized that I’m not sure it’s not just a bucket sort, with the buckets shaped like the normal curve.

Leave a Reply

Your email address will not be published. Required fields are marked *