illustrated-algorithms

Learning and science

algorithm visualization

SHOW HN2017

187points
48comments
#186of 2,242 in 2017
Top 9%of 2017 by points

How HN took it

MixedNo clear lean

4 positive, 10 neutral or asking, 2 mixed, 6 critical, out of 22 comments about the project. Thread score -0.06.

Design: 2 for, 2 againstExecution: 1 for, 2 againstIdea: 0 for, 2 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Animations are well made and clear

    From 3 comments
    • Good work, looks great! I have the following comments, hope you find them useful: * I find counter intuitive that the animation goes up, i think it should go down, but that…
      Rabei on HN
    • Thank you for this. The work to both understand the algorithm and then animate it, much appreciated
      gigatexal on HN
    • This was cool, the highlighted code tour is a great touch. For anyone else who enjoyed this, you might also enjoy this blog post full of animated algorithms by Mike Bostock:…
      notduncansmith on HN

Objections

  • Fruit illustrations are less intuitive than numbers

    From 3 comments
    • Personally I find https://visualgo.net/ to be more helpful. I don't think the fruits are too intuitive.
      snackai on HN
    • I agree. I find https://visualgo.net/sorting to provide easier to understand animations. Also, the fruits are less understandable to me than simple numbers.
      bastijn on HN
    • Good work, looks great! I have the following comments, hope you find them useful: * I find counter intuitive that the animation goes up, i think it should go down, but that…
      Rabei on HN
  • Animation is too fast to follow; no slow mode

    From 1 comment
    • Looks great. Have an option to slow it down though. I couldn't follow the animation and the code on the right it was going so quickly.
      deanclatworthy on HN
  • Implementation drops duplicate elements

    From 2 comments
    • Nice work! One other note, in addition to the comments here: the algorithm as it's currently written will drop repeated elements. You can easily fix that by changing `greater` to…
      bjarnagin on HN
    • I may not have parsed your question correctly, so I apologize in advance. Assuming you are asking about what happens to the "equal" elements- Yes, there is a bug in this code. It…
      cmurphycode on HN
  • Not in-place, unlike real quicksort

    From 1 comment
    • some constructive feedback: one of the greatest features of quicksort is that it is an in-place algorithm, it doesn't use any additional storage. qsort cleverest trick is to…
      lanna on HN

Requests

  • Add a slow motion or speed control option

    From 2 comments
    • Looks great. Have an option to slow it down though. I couldn't follow the animation and the code on the right it was going so quickly.
      deanclatworthy on HN
    • That would be nice but auto play is good. Just allow 2-3 options for the speed of a tick.
      deanclatworthy on HN
  • Add per-step and back/forward buttons

    From 2 comments
    • Sure but it would be nice to step through at your own pace rather than by intricately dragging a mouse and having to hold the click.
      deanclatworthy on HN
    • Good work, looks great! I have the following comments, hope you find them useful: * I find counter intuitive that the animation goes up, i think it should go down, but that…
      Rabei on HN
  • Show in-place partitioning

    From 2 comments
    • some constructive feedback: one of the greatest features of quicksort is that it is an in-place algorithm, it doesn't use any additional storage. qsort cleverest trick is to…
      lanna on HN
    • With so few elements, I think you can perform the in-place swap as one animation. Take the pivot out, put an arrow on the first and last elements in the list, then - if the left…
      Asooka on HN
  • Allow setting custom initial lists

    From 1 comment
    • That's snazzy, good work! I found myself wanting to set my own initial order of the list to see what some specific edge cases (already sorted, one element off from being sorted,…
      vinylkey on HN

Questions

  • Why use quicksort rather than mergesort as the example

    From 1 comment
    • Why do people keep using Quicksort as an example? I find Mergesort to be much more intuitive. And better yet, it has a much better worst-case performance.
      amelius on HN
  • Is filtering into less and greater faster than a single pass

    From 1 comment
    • That's amazing. Just two questions 1) on quicksort: ``` const less = list.filter(i => i < pivot); const greater = list.filter(i => i > pivot); ``` Wouldn't this be faster: ```…
      baby on HN

Alternatives named

  • VisuAlgo

    From 2 comments
    • Personally I find https://visualgo.net/ to be more helpful. I don't think the fruits are too intuitive.
      snackai on HN
    • I agree. I find https://visualgo.net/sorting to provide easier to understand animations. Also, the fruits are less understandable to me than simple numbers.
      bastijn on HN
  • Mike Bostock's animated algorithms

    From 1 comment
    • This was cool, the highlighted code tour is a great touch. For anyone else who enjoyed this, you might also enjoy this blog post full of animated algorithms by Mike Bostock:…
      notduncansmith on HN
  • Toptal sorting algorithms visualization

    From 1 comment
    • This one? https://www.toptal.com/developers/sorting-algorithms
      shric on HN
  • USF comparison sort visualization

    From 1 comment
    • Absolutely: https://www.cs.usfca.edu/~galles/visualization/ComparisonSort.html
      liamondrop on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/13642967)