Ask HN: What's the best algorithms and data structures online course? - zabana
======
osoba
In addition to the Stanford courses mentioned in another comment, there are
also two Princeton courses taught by Sedgewick
[https://www.coursera.org/instructor/~250165](https://www.coursera.org/instructor/~250165)
and the MIT course taught by Demaine [https://ocw.mit.edu/courses/electrical-
engineering-and-compu...](https://ocw.mit.edu/courses/electrical-engineering-
and-computer-science/6-006-introduction-to-algorithms-fall-2011/lecture-
videos/)

~~~
_asummers
The followup to the Demaine one is great too. Not at all intro, but great if
your foundations are strong.

[https://ocw.mit.edu/courses/electrical-engineering-and-
compu...](https://ocw.mit.edu/courses/electrical-engineering-and-computer-
science/6-851-advanced-data-structures-spring-2012/)

~~~
tudelo
Would you say this is good for someone who has recently graduated and has been
in industry for a year or so to refresh on?

~~~
_asummers
They touch on a bunch of decently exotic data structures like van Emde Boas
trees and things like cache oblivious data structures. If you're comfortable
with data structures and algorithm design (which it sounds like you are, from
your description) it should be accessible. At the end of the day it's just a
graduate level CS course.

------
jfaucett
I know its not an online course and its a relatively massive tome, but I'd
recommend just working through "Introduction to Algorithms" by
Cormen/Leiserston/Rivest/Stein [1].

This book has great explanations and exercises for everything you could want
to learn from the basics of sorting and algorithmic design and analysis, to
graph algorithms, linear programming, and dynamic programming.

It lacks some degree of depth on more advanced topics, but if you work your
way through it and actually implement what you read and do the exercises, you
will be more than well enough equipped to take on just about any problem.

The key is going to be to actually implement what you read/learn, I think it
might take you a little more time than watching an online course, but in the
long run it will give you a much deeper knowledge of the material.

1\. [https://www.amazon.com/Introduction-Algorithms-Thomas-H-
Corm...](https://www.amazon.com/Introduction-Algorithms-Thomas-H-
Cormen/dp/0262531968)

~~~
zombieprocess
Isn't this book too academical for any practical learning of algorithms and
data structures?

I would recommend The algorithm design manual for more practical purposes.
[https://www.amazon.com/Algorithm-Design-Manual-Steven-
Skiena...](https://www.amazon.com/Algorithm-Design-Manual-Steven-
Skiena/dp/1849967202/ref=sr_1_1?ie=UTF8&qid=1519228390&sr=8-1&keywords=the+algorithm+design+manual)

~~~
jfaucett
> Isn't this book too academical for any practical learning of algorithms and
> data structures?

I don't think so, I've worked through it and I didn't find it that
difficult/academic. But I actually don't read a lot of computer science books
/ textbooks so I don't really have much to compare it to other than
mathematical texts which I do read a lot of.

If you don't like proofs or math then its probably not the best text to work
through, on the other hand, if you like rigorously understanding the material
I would highly recommend it.

Either way, from what I remember it gives psuedocode for just about everything
and has lots of graphs and pictures for elucidating the material, so you could
probably just skip the math if you have an allergy to corrolaries, theorems,
and proofs. Admittedly, that extra insight is probably a lot of the reason I
liked it so much.

------
ahamedirshad123
Don't know about the best, but I learned a lot from these two courses.

[https://lagunita.stanford.edu/courses/course-v1:Engineering+...](https://lagunita.stanford.edu/courses/course-v1:Engineering+Algorithms1+SelfPaced/about)

[https://lagunita.stanford.edu/courses/course-v1:Engineering+...](https://lagunita.stanford.edu/courses/course-v1:Engineering+Algorithms2+SelfPaced/about)

~~~
deepGem
Tim Roughgarden is a fantastic teacher. I personally love his style and speed.
He throws in some humor here and there and makes learning a lot of fun. His
lectures on graphs are absolutely brilliant.

This same course is available on Coursera as well.

~~~
ahamedirshad123
Yes. Same as Coursera. I took this on Coursera only, before specialization
thing happened. Don't know if the course videos and exercises are fully
available for audit purpose.

------
icc97
It's not really a course but I found InterviewBit [0] a great resource. It
structures everything around moving from simpler to more complex data
structures and algorithms. It's kind of learning by doing lots and lots of
questions. You have to complete enough problems in one section to move onto
the next.

I spent a hundred hours going through the various tests and it showed the
power of functional programming / recursion. The questions that took me much
longer than average were the ones where I had a bug and had to track it down.
The recursive problems didn't suffer from this, ie I would get the solution
pretty much correct first time. This could just have been the questions / my
programming style but I found it eye opening.

[0]: [https://www.interviewbit.com/](https://www.interviewbit.com/)

------
vthallam
If your eventual goal after learning the basics is programming questions for
interviews, there are a tons of resources like leetcode, interviewbit,
geeksforgeeks. I started writing some of the FAQ with explanations here[1],
check it out to see if it is of any help for you.

[1] : [http://letstalkalgorithms.com/](http://letstalkalgorithms.com/)

------
ruslanmsv
The best one is HSE & Yandex & Computer Science Club & UC San Diego 6 course
specialization on coursera

[https://www.coursera.org/specializations/data-structures-
alg...](https://www.coursera.org/specializations/data-structures-algorithms)

~~~
chillytoes
I agree. This sequence of courses is the best I've found.

------
ninjakeyboard
The princeton one on coursera is really great and easy to read. Buy the book
and take the course. Sedgewick is my hero. It doesn't require a lot of math in
contrast to the Stanford coursera one. It's much easier for the general person
to follow IMO. [https://www.coursera.org/learn/algorithms-
part1](https://www.coursera.org/learn/algorithms-part1)

------
indescions_2018
All good resources. I'd also add Algorithms, Etc. by Jeff Erickson.

[http://jeffe.cs.illinois.edu/teaching/algorithms/](http://jeffe.cs.illinois.edu/teaching/algorithms/)

And for practice, Google Code Jam past problems are quite challenging ;)

[https://code.google.com/codejam/](https://code.google.com/codejam/)

~~~
WalterGR
The past problems are here: [https://code.google.com/codejam/past-
contests](https://code.google.com/codejam/past-contests)

------
southphillyman
Is it wise to do any of these courses without taking a course in linear
algebra first? I started watching Skiena's algorithm course on youtube
recently and he seemed to really emphasize finishing a course in linear
algebra before taking any algorithm course. Thoughts?

~~~
3uclid
No, I don't believe so (from my experience as a CS undergrad).

~~~
bernardino
Linear algebra isn’t a prerequisite for learning data structures and
algorithms. Though you typically do find linear algebra to be part of the
lower division computer science curriculum at most colleges. I would recommend
you take a course in it, I argue it expands one’s problem-solving mental
models.

~~~
3uclid
I certainly agree. However, if OP is simply referring to learning the typical
algorithms presented in an undergraduate CS course, then linear algebra isn't
a strict prerequisite.

------
anonoholic
This is useful background: "Mathematics for Computer Science"

[https://courses.csail.mit.edu/6.042/spring17/mcs.pdf](https://courses.csail.mit.edu/6.042/spring17/mcs.pdf)

~~~
zabana
Yeah I'm currently going through this course. Some of it is going over my head
but I get the basic concepts

------
gameguy43
The Intuitive Guide to Data Structures And Algorithms, on Interview Cake:
[https://www.interviewcake.com/data-structures-and-
algorithms...](https://www.interviewcake.com/data-structures-and-algorithms-
guide)

Disclosure: my company made this :)

------
westurner
These aren't courses, but from answers to "Ask HN: Recommended
course/website/book to learn data structure and algorithms" :

Data Structure:
[https://en.wikipedia.org/wiki/Data_structure](https://en.wikipedia.org/wiki/Data_structure)

Algorithm:[https://en.wikipedia.org/wiki/Algorithm](https://en.wikipedia.org/wiki/Algorithm)

Big O
notation:[https://en.wikipedia.org/wiki/Big_O_notation](https://en.wikipedia.org/wiki/Big_O_notation)

Big-O Cheatsheet: [http://bigocheatsheet.com](http://bigocheatsheet.com)

Coding Interview University > Data Structures:
[https://github.com/jwasham/coding-interview-
university/blob/...](https://github.com/jwasham/coding-interview-
university/blob/master/README.md#data-structures)

OSSU: Open Source Society University > Core CS > Core Theory > "Algorithms:
Design and Analysis, Part I" [&2] [https://github.com/ossu/computer-
science/blob/master/README....](https://github.com/ossu/computer-
science/blob/master/README.md#core-theory)

"Algorithms, 4th Edition" (2011; Sedgewick, Wayne):
[https://algs4.cs.princeton.edu/](https://algs4.cs.princeton.edu/)

Complexity Zoo > Petting Zoo (P, NP,):
[https://complexityzoo.uwaterloo.ca/Petting_Zoo](https://complexityzoo.uwaterloo.ca/Petting_Zoo)

While perusing awesome-awesomeness [1], I found awesome-algorithms [2] ,
algovis [3], and awesome-big-o [4].

[1] [https://github.com/bayandin/awesome-
awesomeness](https://github.com/bayandin/awesome-awesomeness)

[2] [https://github.com/tayllan/awesome-
algorithms](https://github.com/tayllan/awesome-algorithms)

[3] [https://github.com/enjalot/algovis](https://github.com/enjalot/algovis)

[4] [https://github.com/okulbilisim/awesome-
big-o](https://github.com/okulbilisim/awesome-big-o)

