Illustrated Sorting Algorithms
sorting.at
sorting.at
It almost certainly is. It could be an OS or graphics driver problem, but these options are far less likely.
It certainly isn't the site's problem: in the ideal world we don't live in (where browsers, drives and OSs have no faults) it is not be possible for any browser hosted code to take down the whole browser or worse, even if deliberatey trying to do so. The site may be doing something that highlights a problem elsewhere, that the site's designer may be able to work around, but that problem is not their fault.
If the crash is repeatable it would be useful to report it to the Firefox team as that may help them find the bug and therefor either fix it or report it further upstream if it isn't in their code.
> but you'd hope the developer would test on the major browsers.
The developer probably did, if by "major browsers" you mean "the latest of the two of the big three that are available cross platform, and maybe a mobile browser or two" as they were at the time of the site/app's last major update. But testing on all common browsers can be a time consuming process that demands significant resources (a Windows instance for each IE version considered, a Windows, Linux, and OSX instance for each version of Firefox or Chrome considered (as they sometimes hit different problems on different platforms), oh and don't forget that there are several common Linux arragements that you'll see actively used by many people, 8 Windows variants (excluding service packs as variants, 7 if you exclude XP), and a few OSX ones, and that is before you consider 32-bit and 64-bit variations and I've not even touched mobile platforms yet, ..., ..., ...).
Multi-browser testing can be a painful process and even if you either stick to a limited number of combinations (that covers for example 80% of your audience) and/or have the testing automated by some means, the results of tests that you run now might not be relevant tomorrow after a browser maker releases an update or an OS maker releases an update that somehow triggers a latent bug in a browser.
tl;dr: if the browser crashes that is never the site/app's developer's fault. If the site/app fails to work correctly in a given (recent and relatively standards compliant) browser than it probably is but there are practical limitations on what we can do to try acheive 100% correctness.
It also doesn't crash on this page either.
But do open it in Chrome, it's lovely.
I would have thought we'd gotten past the need for browser-specific code and the days of having to decide between ignoring the Netscape people or ignoring the IE people. It's bad enough that sites which simply don't work in a certain browser are becoming more commonplace again, now apparently some code is essentially hostile in the wrong browser.
The good stuff is here: http://www.infinitepartitions.com/art001.html
Another nice sort visualization is Sortviz.org. For example:
http://sortvis.org/algorithms/combsort.html
and
I did a basic hack on a sorting visualisation a while ago [0] and have felt for a long time there is a lot more possible with algorithm visualisation in general than has been done in the past. Hopefully we see lots more awesome stuff like this in the future :)
In particular: Quicksort, which (unless you're willing to make an (expensive) call to a (P)RNG per iteration) has a worst case of O(n^(2)) time.
"Engineering a Sort Function"[0] covers this quite well.
In some experiments of my own, I've found that even Smoothsort[1] (an algorithm specifically designed to have a smooth transition from linear to linearithmic behavior on nearly-sorted input) can't beat the C++ system's introsort (a quicksort variation with a fallback to heapsort) in already-sorted inputs.
[0] http://www.skidmore.edu/~meckmann/2009Spring/cs206/papers/sp...
And merge sort is often faster, especially if the comparison function is relatively expensive.
Technically, the worst case stays the same.
In actuality, the worst case occurring via random chance is not a problem, as it occurs vanishingly infrequently. The problem is malicious input.
As already said, this is very nicely done.
Really, you need to watch this if you haven't. https://www.youtube.com/watch?v=SJwEwA5gOkM
Another sorting visualization that I like is this one: https://www.youtube.com/watch?v=kPRA0W1kECg. It is well-known but the way everything falls back into place at each time... that's very satisfying.
here's another sorting algo sim: click the computer science example.