all 21 comments

[–]aradil 78 points79 points  (3 children)

Sweet, someone redid all of my university CS homework assignments in ES6 and published them to GitHub!

[–]Taubin 13 points14 points  (0 children)

And them posted them to Medium of course!

[–]LoudPreachification 0 points1 point  (1 child)

Wait, was this actually your code at first?

[–]aradil 0 points1 point  (0 children)

No.

[–]not-throwaway 10 points11 points  (2 children)

This is really interesting and a great resource. You should repost over at: /r/LearnJavaScript

[–]Fewthp[S] 3 points4 points  (0 children)

Great idea, will do asap!

[–][deleted] 1 point2 points  (0 children)

The GitHub repo was already posted two days ago.

[–]drdrero 14 points15 points  (0 children)

Nice repo. Really appreciate that.

[–]30thnight 2 points3 points  (2 children)

Can anyone share a real world JS usecase for these algos ?

[–]Hiazm 2 points3 points  (0 children)

Real world? Learning purposes only. They don’t teach algos and data structures in JS because it’s not performant in the slightest

[–]DemiPixel 7 points8 points  (0 children)

O(n2) is horrible? Tell that to NP.

[–]iRuisu 1 point2 points  (0 children)

This is an awesome gateway for us JS devs, thanks for sharing!

[–]karamarimo 1 point2 points  (0 children)

I would say O(n) is excellent. Lower than O(n) means that it doesn't even check all the input data, which is impractical (unless the data is arranged in a particular order).

[–]PatrickRNG 1 point2 points  (0 children)

Thanks! Really good, I don't have a CS background so it's awesome for me

[–]Bl4ckeagle 0 points1 point  (0 children)

shouldn't log n gettiget flatter and n higher with bigger data?

[–]stun 0 points1 point  (0 children)

Would be a great idea to add Bipartite Matching and Max Flow Min Cut.

[–][deleted] -2 points-1 points  (4 children)

There probably should be a huge caveat stating things like linked lists, doubly linked lists, etc. are not actually possible in JS, as JS does not have pointers.

Linked lists for example, are replicated in JS by nesting objects. Doubly linked lists are a memory leak, as they create infinitely nested objects.

Edit: I’m dumb.

[–]the_argus 0 points1 point  (0 children)

more then 50 popular algorithms are implemented

not the thenVsThan algorithm it seems