Live data from Hacker News

Algorithms

khanacademy.org

101–110 of 163 posts

Re: Algorithms

#101
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.

He's got a pair of Coursera courses that run frequently covering most of the books.

Re: Algorithms

#103
The Coursera Stanford [0] and Princeton [1] courses start again soon, February 20 to be exact. Not sure which one is better, but to refresh my atrophied CS skills of 10 years I've joined the Stanford course. Not sure how it compares to the Khan Algorithms course. Anyone have any feedback?

[0] https://www.coursera.org/learn/algorithm-design-analysis/

[1] https://www.coursera.org/learn/algorithms-part1/

Re: Algorithms

#104
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]

They're the lesser gods and demons (often swapping places) of the pantheon.

Re: Algorithms

#105

It's strange they didn't cover dynamic programming at all. IMO every course should include at least one classical example of dynamic programming. For example: https://en.wikipedia.org/wiki/Longest_increasing_subsequence https://en.wikipedia.org/wiki/Longest_common_subsequence_pro...

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?

You might call it a super-set of recursion-with-caching. It's a common technique, but it's not the whole field - you can also start at the "leaves" and summarize your way up to the "start" (and similar-ish things that don't involve recursive thinking at all). In many ways similar, but not actually the same. No call stack, for starters.

"just caching" is also hard to apply to e.g. the tower of hanoi problem.

Re: Algorithms

#106
post #42

Earlier quoted context omitted.

Significant whitespace is great for technical interviews - you don't need to worry about matching brackets and whatnot. No brackets also means you have some more vertical space to work with on the whiteboard. Beyond that, if your interviewer is fluent in python, list comprehensions can greatly shorten the amount of boilerplate you have to write.

Amusingly, significant whitespace is the one reason I don't like using Python in whiteboard interviews - my handwriting is far from excellent on a board, and I don't want any ambiguity when reading my control flow. I'll definitely second the list comprehension point, though. Between that and pleasant string support, a lot of standard interview answers are maybe 50% as long in python as Java. Not easier, necessarily,…

Indentation is a pretty good thing to practice for whiteboards. A lot of people have a tendency to waste more and more space on the left as they go. It's a pretty easy thing to fix, just do some questions and have someone there to correct you whenever you start doing it.

Even if you aren't using python, it will give you more room to work (the other part of this is divide the board before you start).

Re: Algorithms

#107
post #60

Can anyone recommend an alternative introduction to asymptotic notation?

Different in what way? The general idea is that something takes O(f(n)) time if it takes at most C·f(n) time for some constant C and all but finitely many values of n. The 'all but finitely many values' is what makes this definition 'asymptotic'. Basically 'O(f(n))' ignores constant factors and the behaviour at 'small' n (i.e. small inputs), the reasoning behind this is that an algorithm in O(f(n)) is faster than any…

The information made intuitive sense to me. I just couldn't apply what was read directly to the exercises. It felt as though something crucial had been omitted. That something turns out to be calculus.

Re: Algorithms

#108

It's strange they didn't cover dynamic programming at all. IMO every course should include at least one classical example of dynamic programming. For example: https://en.wikipedia.org/wiki/Longest_increasing_subsequence https://en.wikipedia.org/wiki/Longest_common_subsequence_pro...

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?

Dynamic programming is very similar to caching and memoization, but is not the same thing.

Re: Algorithms

#109
Talked to someone who wanted to work at one of the big megacorps as a software engineer, asked for advice to pass the interview. I asked them if they could implement quicksort. They said maybe, but they didn't really want to study algorithms. I guess they really didn't want the job after all.

Re: Algorithms

#110
post #103

The Coursera Stanford [0] and Princeton [1] courses start again soon, February 20 to be exact. Not sure which one is better, but to refresh my atrophied CS skills of 10 years I've joined the Stanford course. Not sure how it compares to the Khan Algorithms course. Anyone have any feedback? [0] https://www.coursera.org/learn/algorithm-design-analysis/ [1] https://www.coursera.org/learn/algorithms-part1/

EdX as well,

- 6-00-1x https://www.edx.org/course/introduction-computer-science-mit... (started)

- 6.00.2x https://www.edx.org/course/introduction-computational-thinki... (March)

All are good and are pitched at various levels of complexity. The Princeton course uses Java. Okay if you're into that sort of language/thinking. MIT is using Python. Found one using lisp, "Systematic Program Design" ~ https://www.edx.org/xseries/how-code-systematic-program-desi...

Post reply on HN