Hacker News new | past | comments | ask | show | jobs | submit login
Interactive Algorithm Visualizer (jasonpark.me)
144 points by nimitkalra on May 22, 2016 | hide | past | favorite | 9 comments



The visualizer is really nice, the examples could use some work though.

Selection Sort, for example, makes the algorithm look extremely (impossibly) good at first glance - O(n) - because it's not showing the majority of the steps.

Instead of

    for (var j = i + 1; j < D.length; j++) {
        if (D[j] < D[minJ]) {
            tracer._select(j);
            minJ = j;
            tracer._deselect(j);
        }
    }
it has to be

    for (var j = i + 1; j < D.length; j++) {
        tracer._select(j);
        if (D[j] < D[minJ]) {
            minJ = j;
        }
        tracer._deselect(j);
    }
Bubble Sort has the same problem, as do Quicksort and Mergesort.

Normally I wouldn't mind, but these examples are intended for beginners, and it might give them a false sense of time complexity for these basic algorithms.


Raise an issue in case the author isn't reading here. https://github.com/parkjs814/AlgorithmVisualizer/issues


Interesting. I've been working on an interactive 3D algorithm/data structure visualizer (http://tiledtext.com/projects/avd), 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.


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.



This tool reminds me of the work of Bret Victor who challenged developers to build visualization tools for code:

https://vimeo.com/36579366


Fantastic tool! I wish more code visualization tools like these were available.

Great job.


Great work! Reminds me of http://visualgo.net/


Thank you for mentioning this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: