Hacker Newsnew | past | comments | ask | show | jobs | submit | samwho's commentslogin

This is what I use and I’ve been very happy with it for many years. It hasn’t caused me any trouble and as far as I can tell it hasn’t changed in the whole time I’ve used it.


Hehe, yes, Ned sent me a lovely email the other day about it. Happy to be doing my part.


Can’t imagine what it might be.


If that's sarcastic, do you have any idea why probability is different?


All the code is at https://github.com/samwho/visualisations. I didn’t use much more than basic JS, CSS, and HTML for this one. The only third party dependency, iirc, was one to parse JavaScript into an AST.


I’m glad you like them! <3


I just want to add to the chorus that your visualizations are outstanding.


Came here to say the same.

Don't want to start a separate comment thread repeating what's been said before, but I felt compelled to contribute to the crescendo of this one instead.

These visualisations are simply great.

Programmer of 30 years here. Studied Big O formally around 20 years ago. Loved the refresher. But beyond all that, I found the in-line animation examples were just superbly executed.

I would have absolutely *loved* this style of teaching in my undergraduate algorithms class. It is tangible and practical - not to mention fun.

Kudos to the author.


So impressive!


That’s a good idea, I should try that.


They do! Part of me wanted to go back and change the sum function to something else but in the end I figured it’s not important.


There's a comment thread further down that disagrees with you.


I am not interested in arguing so I'll just repeat that your article is beautiful and even though it's not entirely correct I think it has value and I appreciate the time you spent working on this and putting it out to help others.


Thank you, I appreciate that a lot.


...where?


Ah, I conflated worst case with upper bound. My mistake.


I'd love to hear more about how a quadratic sorting algorithm could be said to be O(n^3). That isn't intuitive to me.


Technically the big O notation denotes an upper bound, i.e. it doesn’t mean “grows as fast as” but “grows at most as fast as”. This means that any algorithm that’s O(n²) is also O(n³) and O(n⁴) etc., but we usually try to give the smallest power since that’s the most useful information. The letter used for “grows as fast as” is big Theta: https://en.wikipedia.org/wiki/Big_O_notation#Use_in_computer...


Ahh I see, thank you!


Because |n^2|≤|n^3| as n→∞, so if |f| ≤ A|n^2| as n→∞, then |f| ≤ A|n^3| as n→∞.


It was, thank you so much <3


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

Search: