TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Sorting Visualizations

651 pointsby infodroidover 7 years ago

21 comments

heydenberkover 7 years ago
Mike Bostock, the author of d3.js, has a similar post in which he uses angled sticks to indicate sorting order, and also touches on some other algorithmic visualizations.<p><a href="https:&#x2F;&#x2F;bost.ocks.org&#x2F;mike&#x2F;algorithms&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bost.ocks.org&#x2F;mike&#x2F;algorithms&#x2F;</a>
评论 #15423866 未加载
panicover 7 years ago
The use of the vertical axis here is brilliant! I&#x27;ve seen visualizations where time is one of the axes, but showing a random sampling of arrays really lets you see the &quot;ensemble behavior&quot; of the algorithms.
_asummersover 7 years ago
My favorites have always been the folk dance versions!<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ROalU379l3U" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ROalU379l3U</a>
评论 #15424065 未加载
评论 #15424753 未加载
pvillanoover 7 years ago
I really wish the frame rate was every n comparisons or seconds instead of the rate of the outer loop. In the first four, the boundary between sorted and unsorted should accelerate and the progression of merge sort should be constant. Heapsort should also accelerate, but at a different rate from the n^2 sorts. It would be so much more satisfying.
0xBABAD00Cover 7 years ago
Good stuff, except for the rainbow color scales [1]. I&#x27;d much prefer to see the same in viridis [2] or something similar. The color boundaries on the rainbow scale are not perceived uniformly by human eyes (there might even be a cultural bias at play, i.e. we may distinguish blue from green more readily than different shades of blue, even if they may be objectively at the same distance)<p>[1] <a href="https:&#x2F;&#x2F;visual.ly&#x2F;blog&#x2F;rainbow-color-scales&#x2F;" rel="nofollow">https:&#x2F;&#x2F;visual.ly&#x2F;blog&#x2F;rainbow-color-scales&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;cran.r-project.org&#x2F;web&#x2F;packages&#x2F;viridis&#x2F;vignettes&#x2F;intro-to-viridis.html" rel="nofollow">https:&#x2F;&#x2F;cran.r-project.org&#x2F;web&#x2F;packages&#x2F;viridis&#x2F;vignettes&#x2F;in...</a><p>Edit:<p>Here&#x27;s my demo, in Viridis: <a href="http:&#x2F;&#x2F;gph.is&#x2F;2xZnKxl" rel="nofollow">http:&#x2F;&#x2F;gph.is&#x2F;2xZnKxl</a><p>(Generated in ipython + numpy + matplotlib + seaborn)
评论 #15426140 未加载
评论 #15424519 未加载
评论 #15424082 未加载
评论 #15424730 未加载
d_wattover 7 years ago
I like this project, reminds me a lot of <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=kPRA0W1kECg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=kPRA0W1kECg</a><p>What was used to generate the gifs?
评论 #15426368 未加载
IgorPartolaover 7 years ago
Challenge: look at just the visualization and NAME! THAT! ALGORITHM!
评论 #15423832 未加载
gondoover 7 years ago
one of my favourite <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=bcwwM6EoveA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=bcwwM6EoveA</a>
jasonwelkover 7 years ago
Compared to other visualization, having the extra axis dimension just means what, that the sorting is being done as if each row was an independent sort, and all rows are being sorted simultaneously?
评论 #15424280 未加载
jwdunneover 7 years ago
That was a lot of fun. I remember seeing the visualisations from lowest to highest on a bar chart but this gives a different perspective on how the algorithms work.
hellofunkover 7 years ago
Well, these are really beautiful. I&#x27;ve seen a lot of sorting visualizations, but these were the first that kind of took my breath away.
greggmanover 7 years ago
just throwing this out there. found it was not clear how to count operations for more complex algos<p><a href="http:&#x2F;&#x2F;greggman.github.io&#x2F;doodles&#x2F;sort.html" rel="nofollow">http:&#x2F;&#x2F;greggman.github.io&#x2F;doodles&#x2F;sort.html</a>
cup-of-teaover 7 years ago
These are neat but it&#x27;s a bit odd to call heapsort and mergesort bizarre. Sure if you just think about them as operating on arrays they would seem strange, but if you think about them more abstractly they make complete sense.
caspervonbover 7 years ago
What are the odds, just posted one myself with audio, and intended to have level of details but there are just balls and bars at the moment.<p>Think I&#x27;ll adopt a color scale for the denser datasets, looks great.
jaimex2over 7 years ago
Very cool, I love how new ways of visualising sorting keep appearing.
fredleyover 7 years ago
My favourite sorting algorithm is multiverse sort, which runs on O(n): First, check if the list is sorted. If not, destroy the universe.
afshinmehover 7 years ago
I wonder how they created this visualization?
评论 #15423654 未加载
mgalkaover 7 years ago
Really cool! Is the code posted anywhere? Would like to see how some of these work.
sidcoolover 7 years ago
I always have difficulty mapping the algorithm with visualization. Probably d3-dyslexic.
评论 #15424407 未加载
taozhijiangover 7 years ago
really amazing job!
XCSmeover 7 years ago
The GIFs take forever to load, bad format chosen for displaying the animations.
评论 #15424115 未加载