r/learnjavascript • • Jul 20 '18

86 Classic Algorithms Implemented in JavaScript

https://github.com/trekhleb/javascript-algorithms/blob/master/README.md
146 Upvotes

9 comments sorted by

8

u/jamilkhan123 Jul 20 '18

More like this please

4

u/ndubien Jul 20 '18

So great, I was looking exactly for this kind of repository to play with property based testing experiments based on fast-check framework :) Thanks for sharing

2

u/FriesWithThat Jul 21 '18

If anyone else is curious what this property based testing is all about, this article is the one that helped me understand how it works, and why it's useful.

2

u/ndubien Jul 21 '18 edited Jul 21 '18

Great article, but I suggest you to use fast-check framework instead :)

2

u/FriesWithThat Jul 21 '18

Thanks, I'll check it out.

1

u/ndubien Jul 20 '18 edited Jul 21 '18

Just tried the property based approach on my local fork, see: https://github.com/dubzzz/javascript-algorithms/tree/fastcheck

I found interesting things and issued the associated PRs #100 and #101 and issue #102.

Issues found using fast-check

1

u/[deleted] Jul 21 '18

Holy shit.

-3

u/heyzeto Jul 20 '18

I didn't open it yet but I guess the first one is a bubblesort or some sort.