Suppose you drop some guitar strings and they land randomly ordered in a row on the floor. You want to put them back in order but can only pick up and swap two at a time. An aesthetically pleasing quadratic running time strategy you may follow is Insertion sort http://en.wikipedia.org/wiki/Insertion_sort
If you order the guitar strings by frequency and simultaneously pluck any two which you swap then insertion sort will produce a sound similar to this.
I think it needs a key, as in musical key and not every note possible.
leobaby 2 years ago