bingmann / sound-of-sorting

The Sound of Sorting - "Audibilization" and Visualization of Sorting Algorithms
http://panthema.net/2013/sound-of-sorting/
GNU General Public License v3.0
853 stars 120 forks source link

Addition of partially sorted data to options? #13

Open ApproximateIdentity opened 6 years ago

ApproximateIdentity commented 6 years ago

I hacked in support for an option where the first 90% of your data is sorted and the last 10% is random to better demonstrate a situation in which Timsort is better than Mergesort. Here is the commit where I hacked it in:

https://github.com/ApproximateIdentity/sound-of-sorting/commit/1e523ba7a8cd52853c3001b9ea71c815acee8816

Note that I did it by simply replacing the random shuffle in the codebase with my own. In other words, it's a horrible hack that should never go in. However, maybe a dropdown should be added with something like this? If there's interest I could try to do that myself (or someone else could probably do it much quicker), but I didn't want to go down that road blindly since I'm apparently entirely incompetent at programming with wx.

In any case, here's the video that I made which was the reason for my hack in the first place:

https://www.youtube.com/watch?v=ZxLxf5xqqyE

By the way, thanks so much for the great software!