Sorting algorithms visualizer
11–20 of 41 posts
Re: Sorting algorithms visualizer
#12This is interesting, I'd never thought about considering the number of swaps that an algorithm does. It seems like low swapping algos should be better in multithreaded environments due to less locking.
If an exchange is very expensive then you might prefer an order of magnitude more comparisons in order to reduce the number of exchanges needed. The structure of your data makes a difference too especially if you are trying to sort in-place with little or no extra memory: an exchange by insertion is very efficient with a linked list (just rearrange the links) but can be very expensive with a fixed array (shifting the last element to the front involves moving every other element up one).
Sometimes the comparison might be rather expensive at times: if you are trying to sort data stored over many distributed nodes then you need to be careful to pick an algorithm that can constrain itself as much as possible to the local data on each node.
Concurrency can be a big issue even if not running on distributed data: some algorithms are much more "lock heavy" than others.
And even for a single threaded local only sort on modern CPUs cache use can make a big difference: an algorithm that you intuit should run quickly because it can move objects very far at each step might not be all that good because it much more rarely sees cache hits when looking at data than one that works on smaller local chunks in its inner loop.
No one method fits every use: sometimes you want an exchange class sort, sometimes insertion class, sometimes , ...
Re: Sorting algorithms visualizer
#13(https://rosettacode.org/wiki/Sorting_algorithms/Sleep_sort)
Re: Sorting algorithms visualizer
#14This is a really nice page! It would be even nicer if there was some way to find out who made it and/or how to contact the author(s); and/or how and whether one can add more algorithms (e.g. I'd love to see timsort and introsort). As it is, this site seems to be completly anonymous. Which is of course a valid choice by the author(s), but IMHO quite sad :-(.
Not completely anonymous. http://who.is/whois/http://www.sorting-algorithms.com
Re: Sorting algorithms visualizer
#15http://www.cs.usfca.edu/~galles/visualization/Algorithms.htm...
Many algorithms and nice visualizations.
Re: Sorting algorithms visualizer
#16One of my favorite sites that i usually share with my students is: http://www.cs.usfca.edu/~galles/visualization/Algorithms.htm... Many algorithms and nice visualizations.
Re: Sorting algorithms visualizer
#17Re: Sorting algorithms visualizer
#18When comparing the sort algorithms, how is one defined as stable vs not-stable?
Re: Sorting algorithms visualizer
#19One of my favorite sites that i usually share with my students is: http://www.cs.usfca.edu/~galles/visualization/Algorithms.htm... Many algorithms and nice visualizations.
Re: Sorting algorithms visualizer
#20A folk dance group made sorting algo visualizations via Hungarian / Romanian folk dances :)