Re: Degree of so/unrtedness - please help a programmer
- From: "Chip Eastham" <hardmath@xxxxxxxxx>
- Date: 27 Apr 2006 12:16:58 -0700
almurph@xxxxxxxxxxxxx wrote:
Hi,
Apologies if I'm in the wrong forum or if this is too lightweigh but
I'm at the end of my teather.
Say you have an array of say integers - and you want to determine
how well sorted or unsorted said array is - my question is how do you
do this?
I have searched high and low for an algorithm on Google and all my
coding books but have come up zip! I can't believe it - surly there
must be an algorithm that can quantify sortedness for an array?
I would greatly appreciate any
advice/comments/code-samples/references that you may have to offer me.
BTW, this issue came about as I weas reading about the differing
amoung of sorting techniques (like quicksort, bubble etc...) All of the
books tak about selecting the right algorithm based upon the degree of
sortedness but *none* say anythign about how to measure this!
To keep it simple, here's a Web page which lists a few way, in the
context
of sort algorithms:
[Measures of sortedness]
http://www.cs.duke.edu/~mlittman/courses/Archive/cps130-97/lectures/lect05/node16.html
regards, chip
.
- Prev by Date: Re: Distance between a closed and a compact set is positive.
- Next by Date: Re: Calculus XOR Probability
- Previous by thread: Re: Degree of so/unrtedness - please help a programmer
- Next by thread: Re: Degree of so/unrtedness - please help a programmer
- Index(es):
Relevant Pages
|