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.

Interactive Algorithm Visualizer

144 pointsby nimitkalraalmost 9 years ago

7 comments

wnesensohnalmost 9 years ago
The visualizer is really nice, the examples could use some work though.<p>Selection Sort, for example, makes the algorithm look extremely (impossibly) good at first glance - O(n) - because it&#x27;s not showing the majority of the steps.<p>Instead of<p><pre><code> for (var j = i + 1; j &lt; D.length; j++) { if (D[j] &lt; D[minJ]) { tracer._select(j); minJ = j; tracer._deselect(j); } } </code></pre> it has to be<p><pre><code> for (var j = i + 1; j &lt; D.length; j++) { tracer._select(j); if (D[j] &lt; D[minJ]) { minJ = j; } tracer._deselect(j); } </code></pre> Bubble Sort has the same problem, as do Quicksort and Mergesort.<p>Normally I wouldn&#x27;t mind, but these examples are intended for beginners, and it might give them a false sense of time complexity for these basic algorithms.
评论 #11751369 未加载
westoncbalmost 9 years ago
Interesting. I&#x27;ve been working on an interactive 3D algorithm&#x2F;data structure visualizer (<a href="http:&#x2F;&#x2F;tiledtext.com&#x2F;projects&#x2F;avd" rel="nofollow">http:&#x2F;&#x2F;tiledtext.com&#x2F;projects&#x2F;avd</a>), but was thinking of it more as a debugging tool than an educational aid. I like the catalog aspect here: would be nice to have one of these for every wikipedia algorithm page.
bkokoszkaalmost 9 years ago
Really nicely done! The animations though would be more enlightening if you exposed more of the algorithm state in them, e.g. by showing how the queue grows and shrinks in the BFS visualization.
jazzidoalmost 9 years ago
Also see Walnut.io: <a href="https:&#x2F;&#x2F;thewalnut.io&#x2F;app&#x2F;release&#x2F;34" rel="nofollow">https:&#x2F;&#x2F;thewalnut.io&#x2F;app&#x2F;release&#x2F;34</a>
rmasonalmost 9 years ago
This tool reminds me of the work of Bret Victor who challenged developers to build visualization tools for code:<p><a href="https:&#x2F;&#x2F;vimeo.com&#x2F;36579366" rel="nofollow">https:&#x2F;&#x2F;vimeo.com&#x2F;36579366</a>
ckib16almost 9 years ago
Fantastic tool! I wish more code visualization tools like these were available.<p>Great job.
Capiraalmost 9 years ago
Great work! Reminds me of <a href="http:&#x2F;&#x2F;visualgo.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;visualgo.net&#x2F;</a>
评论 #11751829 未加载