
JavaScript Visualization of Sorting Algorithms - zevyoura
http://jsdo.it/norahiko/oxIy/fullscreen
======
ck2
Nice. I'd love a timer on the page somewhere.

Also maybe add introspective sort <http://en.wikipedia.org/wiki/Introsort>

I vaguely remember seeing something like this on HN before.

Ah, here we go <http://www.sorting-algorithms.com/>

------
Perceval
For a while I've been wondering if the German Tank Problem could help make
comparison sorts work better on large lists. Unfortunately, I lack the
background to test whether this is true.

You wouldn't have to know the upper or lower bounds of the list, you could
estimate them progressively from a smaller sample. Then you could insert each
item to position N based on your distribution estimate. The further you get
through the list, the better the distribution estimate would get, and
inserting would get more accurate.

Is this plausible? Has this been done already?

~~~
foob
This isn't exactly what you're talking about but I think that it might
interest you: Adaptive Data Partitioning Using Probability Distribution by
Xipeng Shen, Yutao Zhong, and Chen Ding
([http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.1.31...](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.1.3117)).
They estimate the probability distribution using a subset of the data and then
use this to determine the partitions.

~~~
anonymoushn
This seems like a more developed version of what Perceval had mentioned. Using
German Tank Problem-based estimates would involve assuming a uniform
distribution from the beginning.

------
_sebkom
The visualization is nice but it fails to explain the ideas of each algorithm.

And it's interesting that the best visualizations for this are java applets.

------
tristanperry
A pretty useful collection. I've seen all these sorting algorithms depicted
diagramatically previously, but having these all as a collection where you can
change the data set and speed of rendering is pretty nice.

Would be a useful teaching aid IMO, as it quite poignantly demonstrates just
how slow some of the 'intuitive' (for new programmers) sorting algorithms can
be.

------
elliottcarlson
Love the visualization, but feel it would be useful to also show the cycles
utilized for each algorithm using each of the settings.

------
pwalker
Pretty memorizing stuff right there. Makes me think of a more efficient way to
compare all those lines and fit them into a more efficient order via a shorter
algorithm. INtriguing.

------
xhuang
nice one, the bogo is amazing :)

~~~
lasr21
yeah, BOGO FTW!!

------
EragonJ
It's really impressive xD

