Live data from Hacker News

Algorithms

khanacademy.org

81–90 of 163 posts

Re: Algorithms

#81
post #40
post #36

Earlier quoted context omitted.

If Python is the king, C is the court jester juggling knives. Done well it looks amazing, elegant, and efficient, but in the wrong hands you'll lose your hands.

Where is javascript in this medieval court?

Something necessary but evil.

Re: Algorithms

#85
post #9

For anyone wanting to learn algorithms from one of the other heavyweights, not being a C developer, I found this series extremely beneficial: https://www.amazon.com/Algorithms-Parts-1-4-Fundamentals-Str... It also helps that Robert Sedgewick has been in compsci forever (got hit PHC in 1975) and is one of the subject matter experts in algorithms.

Or the newer book with Java code. https://www.amazon.com/Algorithms-4th-Robert-Sedgewick/dp/03... Robert Sedgewick also has fantastic algorithms courses on Coursera.

Another vote here. I prefer this book to the CLRS.

Re: Algorithms

#86

Earlier quoted context omitted.

I'd never heard of the expression "dynamic programming". https://en.wikipedia.org/wiki/Dynamic_programming Am I to understand that it is "just" recursion with caching?

People often make such conclusions about dynamic programming that it's just caching (including myself several years ago). I do recommend you to read this chapter: https://people.eecs.berkeley.edu/~vazirani/algorithms/chap6.... After reading this chapter, you can try to understand why Dijkstra and Floyd-Warshall shortest path in graph algorithms work. These classical and fundamental algorithms combine graph theory wit…

Thank you for the reference.

Re: Algorithms

#87

Earlier quoted context omitted.

Of course! But how are you going to know WHICH library function to use if you don't know what to look for in the first place? Knowing that a problem at hand requires a certain solution is important.

You use the one labeled "sort" and trust the standard library chose reasonable defaults. It's not like the standard lib is going to use bubble sort. If the reasonable defaults aren't good enough... you're in the 10%.

There's a lot more to data structures and algorithms than sorting. For example, just knowing that bloom filters or interval trees exist opens up a ton of options, even if you don't implement them yourself.

For that matter, the choice of sorting algorithm can have security implications. QuickSort on user-facing data can easily become a DoS vulnerability.

Re: Algorithms

#89
post #49
post #40

Earlier quoted context omitted.

Where is javascript in this medieval court?

JavaScript is the archbishop, evangelizing the holy trinity of React, Node.js and MongoDB.

Somewhat appropriate, as nobody expects the Spanish Inquisition.

Re: Algorithms

#90
post #49

Earlier quoted context omitted.

JavaScript is the archbishop, evangelizing the holy trinity of React, Node.js and MongoDB.

I think you meant React, Node, Vue, Vanilla, Backbone, Angular, [trails off]

Top 1000 javascript libraries of 2016: a year-end roundup
Post reply on HN