HN Academy

Online courses recommended by Hacker News users. [about]

Learn Algorithms

Coursera · Stanford University · 13 HN points · 32 HN comments

Algorithms are the heart of computer science, and the subject has countless practical applications as well as intellectual depth. This specialization is an introduction to algorithms for learners with at ...

HN Academy may receive a referral commission when you make purchases on sites after clicking through links on this page. Most courses are available for free with the option to purchase a completion certificate.

Hacker News Comments about Learn Algorithms

All the comments and stories posted to Hacker News that reference this course.

Stanford one on Coursera -> https://www.coursera.org/specializations/algorithms

How about moocs? Am algorithms class will level you up for sure.

https://www.coursera.org/specializations/algorithms comes to mind.

If you don't mind dropping a few bucks on Coursera, Tim Roughgarden's algorithms sequence adopted from his Stanford lectures and MOOC are exceptional:

https://www.coursera.org/specializations/algorithms

Can't recommend enough. The material and instruction are top-notch.

jacquelineo

They are actually available for free on the Stanford online course website.

Feb 15, 2017 · b3b0p on Algorithms

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/

bootload

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

imakecomments

This is just my opinion and I'm sure it differs from others...

Roughgarden's class is advance and expects mathematical maturity. You may find his course quite fast and rough if you are a beginner.

Sedgwick's class is much easier. He is a bit boring and tries to use "real life" examples (in some instances) from the physical sciences to make the material relatable. This in my opinion detracts from the material. Also, he doesn't always fully explain where he got some of the big ohs here and there.

My advice? Follow MIT's OCW course (it uses CLRS). Supplement it with Algorithms Unlocked, the Khan Academy link in OP and CLRS. If you use those 4 resources and put in the work you'll understand the material.

All 4 sources have Thomas C's DNA touch to it (he is the C in CLRS). So you'll find it consistent when you read from one source to the other. After reading/hearing the same thing about 4 different times in 4 different ways it'll begin to click.

Order of easiness is probably Khan Academy > Algorithms Unlocked > MIT Algorithms Course > CLRS.

Algorithms Unlocked is like "pre-CLRS" and Khan Academy's version is the TL;DR version of Algorithms Unlocked.

Hope this helps.

Below are the links,

https://www.amazon.com/Algorithms-Unlocked-Press-Thomas-Corm...

https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press...

https://www.khanacademy.org/computing/computer-science/algor...

https://ocw.mit.edu/courses/electrical-engineering-and-compu...

zumu

> Order of easiness is probably Khan Academy > Algorithms Unlocked > MIT Algorithms Course > CLRS.

Where does Roughgarden's course fit in to this?

augusto2112

I'm going through Sedgewick's class right now. Is the MIT OCW's course math heavy? It lists "Mathematics for Computer Scientists" as a prerequisite, I am somewhat familiar with the material, but not in a very deep level. Should I take that one before?

Cursuviam

The main aspects from Mathematics for Computer Scientists that it assumes is knowledge of asymptotic complexity (O(n)) and basic proof writing skills.

40acres

Great post, thanks for the resources.

I find there are a lot of online resources for those looking to learn algorithms and data structures but I've had trouble finding the same breadth and depth of resources surrounding the math behind CS (discrete math, probability, etc.). Any suggestions?

imakecomments

Read "Discrete Mathematics" by Epp. Probably the easiest Discrete Math intro I came across.

b3b0p

Great feedback and insight. Appreciated. I'll checkout the MIT OCW and Khan Academy first. I'm hardly a beginner, but my skills feel a bit rusty and want to refresh them.

imakecomments

No problem.

sua_3000

I've taken both Stanford's and Princetons Coursera courses, and powered through the MIT OCW, and I would say this evaluation is spot on.

If you have to pick only one go with the MIT OCW, and snag a copy of CLRS. I got mine from my local lib. and it gave me more than enough time to work through the problem sets from the mooc.

dwdz

Any particular reason that you linked MIT course from 2005 instead newer version from 2015?

I recommend learning discrete mathematics, then data structures and algorithms.

I cannot stress enough how important mathematical foundations is. It'll make everything else much easier to learn. I haven't read the book but heard good things about: https://www.amazon.com/Discrete-Mathematics-Applications-Sus... as a beginner text.

Coursera has multiple offerings on Data Structures / Algorithms -- find one that works best for you.

For instance:

https://www.coursera.org/learn/introduction-to-algorithms

https://www.coursera.org/specializations/algorithms

https://www.coursera.org/learn/algorithmic-thinking-1

https://www.coursera.org/learn/algorithmic-toolbox

By doing all of those you'll get a good introductory exposure to the topics.

You should also look at a rigorous course offering of Algorithms. MIT has a few online to view.

Some readings for a beginner are:

https://www.khanacademy.org/computing/computer-science/algor...

https://www.amazon.com/Algorithms-Unlocked-Press-Thomas-Corm...

https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press... (not beginner level but classic)

After all of this you should be fine with diving into interview books. You'll want to whiteboard solutions and be able to do all the difficult problems. Look into sites like leetcode, glassdoor and be able to do the difficult problems posted there.

40acres

Thanks, there are some good resources here. I rushed through CLRS to help prepare for these interviews but I failed at the phonescreen, which was mostly comprised of Leetcode / Hackerrank type questions. I'll definitely take a look at the coursera course specialization but it seems as though these interviews comprise of a 'programming challenge' type question for the phone screen and more with a focus on data structures, algorithms and system design for the onsite.

Sep 21, 2016 · 1 points, 0 comments · submitted by oli5679

I think it's a great idea to study algorithms and math for CS, and that OCW is a very good resource. Also consider taking a Coursera course on algorithms. One taught by Tim Roughgarden started Aug 8. [1] I haven't taken the class, but I've met Tim and seen him talk. He's both extremely intelligent and a dynamic speaker.

I wouldn't prepare specifically for the interview yet. I know that others are very skeptical of the algorithms interview, but I conducted it myself many times, and I'd like to defend it. When done right, the goal is to see how you think about algorithms. I didn't care about whether you jumped to the solution as much as I wanted to hear you think out loud.

My goal was to decide whether I could see myself developing a new algorithm with you as a peer. For many interviewees who lacked a former CS background, the answer was clearly, "No." You need to have a basic and intuitive understanding of Big-O notation, and you need to be able to develop an algorithm yourself. These courses will teach you exactly that (though you absolutely must do the problem sets as well).

Now, it is true that the interview process has its own quirks. So, get experience. Apply to a bunch of jobs, and try to setup interviews with other companies before you even have a phone screen with a company you really want to work for. As with developing algorithms, nothing beats experience. However, I really believe that this step should be secondary to learning the fundamentals. They truly are the basis for the rest.

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

I viewed classes from all three mentioned above and found Prof Sedwick's classes to be very structured and to my style/liking. Prof. Roughgarden is "free flowing" and may require fast thinking to follow him. Prof Demaine's classes gets very mathematical and I found myself sometimes lost in Greek symbols. But Prof. Demaine is very thorough in building the theory.

[1] Prof Sedwick: https://www.coursera.org/course/algs4partI

As @carise said, the content may be gone after June 30th and if you want to download, you can do so using coursera-dl tool

https://github.com/coursera-dl/coursera-dl

[2] Prof Roughgarden: https://www.coursera.org/learn/algorithm-design-analysis

[3] Prof Erik Demaine (MIT OpenCourseware): https://www.youtube.com/playlist?list=PLUl4u3cNGP61Oq3tWYp6V...

There are videos of MIT's Prof Erik Demaine's Intro to Algo's from various semesters. I think any one should do.

I'd like to echo the sentiment that quitting without an offer in hand seems like a risky idea. The extra time to prepare for interviews can definitely look appealing, but plenty of others here have outlined all the ways quitting prematurely could work against you, so I won't repeat that here.

Instead, since you don't have a formal CS education, I'd recommend checking out an online algorithms course like this one: https://www.coursera.org/learn/algorithm-design-analysis/hom...

Practically speaking, like it or not (and trust me, I don't), programming interviews tend to involve a lot of algorithms and data structures problems, so having "never really thought about algorithms" puts you at an immediate disadvantage compared to other candidates. Plus, gaining a grasp of the basics of algorithms and data structures is going to be worthwhile regardless as it will make you a better developer.

I took and completed Algorithms: Design and Analysis, Part 1 ( https://www.coursera.org/course/algo ) for free, and it was 100% worth it. It was just the right amount of challenging, intellectually stimulating, and language agnostic so I think it actually made me a better JavaScript programmer in addition.

I made it a point to meet all the deadlines and assignments, which kept me honest and forced me to be timely. It was free when I did it, but I'm not sure if that's changed since looking at other courses I don't seem able to receive a certificate or weekly grades if not paying... Point being it may be worth it to pay just so you feel incentivized to finish the course with a passing grade :)

Algorithms: Design and Analysis Parts 1 and 2 ( https://www.coursera.org/course/algo and https://www.coursera.org/course/algo2 ) taught by Tim Roughgarden of Stanford. Tim's the best professor I've ever had either on or offline and he does a fantastic job explaining the concepts and breaking down the algorithms into digestible, intuitive pieces. His enthusiasm for the topic and the impressive algorithms is contagious and keeps the challenging courses fun and interesting.

Functional Programming Principles in Scala ( https://www.coursera.org/course/progfun ) by Martin Odersky, the inventor of Scala, is also excellent and a great way to learn and start using Scala and functional programming. Be forewarned though, once you get a taste of Scala, you'll have to be dragged kicking and screaming back to using Java :-).

whitenoice

Here's another very well explained data structure and algorithms course lectures from IIT - http://nptel.ac.in/video.php?subjectId=106102064

truncate

Also MIT OCW lectures for Algorithms. These are old and video quality is not nice, but course is really good. I think they published a newer version of this course too. http://ocw.mit.edu/courses/electrical-engineering-and-comput...

jedmeyers

Also, Algorithms, Part I and II ( https://www.coursera.org/course/algs4partI and https://www.coursera.org/course/algs4partII ) by Kevin Wayne and Robert Sedgewick of Princeton University. They approach algorithms from a slightly different angle than Stanford course does and in my opinion they complement each other very well. I was very impressed by the lectures, practical problems, the autograder, and the 'Algorythms 4th edition' book.

p.s. don't expect any certificate of acomplishment for those courses though. I did them both close to 100% and they did not even show up in completed courses on Coursera. I guess it's the Princenton thing, and I came just for the knowledge so that was fine with me.

That's awesome! I hope to go through that course soon. I just finished 2nd week assignments of Algorithms- Design and Analysis on Coursera - https://www.coursera.org/course/algo

I learned a lot in Roughgarden's course on Coursera:

https://www.coursera.org/course/algo

but I'll be first to suggest going to font of computer science that is TAoCP , not because you're likely to understand most of Knuth, but because it's unlikely that anyone will understand half on the first pass, so there will be something else to learn for a really long time.

Good luck.

Coursera, etc. offer great resources for learning CS. I think Roughgarden's sequence https://www.coursera.org/course/algo is better than Sedgewick's, because it's targeted at upper division rather than lower division students and is language neutral.

On the other hand, Coursera etc. fall into a bit of a grey area regarding "outside of college". Though I tend to think that limiting the options to outside of college doesn't get the OP much.

Jul 21, 2015 · simi_ on Nibble Sort

There's an ongoing Algorithms course on Coursera right now!

https://www.coursera.org/course/algs4partI

edit: found another one, also happening now (can't believe I missed it): https://www.coursera.org/course/algo

Coursera has a couple courses coming up:

Algorithms: Design and Analysis, Part 1: https://www.coursera.org/course/algo

Algorithms, Part I: https://www.coursera.org/course/algs4partI

For algorithms there is this course in coursera. It already started but it is still open for registrations. Its from Stanford Professor Tim Roughgarden. Its also free.

https://www.coursera.org/course/algo

CLRS is quite 'academic' and requires good understanding of mathematics. It's a great book, but not a good one for beginners, imo. It will be difficult as self study for first timers. You can start with Datastructures and Algorithm Analysis in C by M. A. Weiss[0]. One more alternative is The Algorithm Design Manual by S. Skiena[1]. It's also good and focuses more on algorithm, implementation (as opposed to math-y stuff of CLRS). If I were you, I would get both the books and read alternatively. Don't miss out on exercises, they are very important.

I also suggest you to join this Coursera course, Algorithms: Design and Analysis by Tim Roughgarden[2]. Currently the course is open, so you can sign up for classes. The course is offered in two parts[3], complete both of them.

Once you are comfortable with basic concepts start solving questions/puzzles online on sites like SPOJ[4], UVa[5], (YC-funded) HackerRank[6]. You could try TopCoder[7] also, but the questions are bit difficult. Hope this helps.

PS - You should study math, because it is important in Algorithms Analysis. You could try reading required parts of Concrete Mathematics by Knuth[8] or as you come across new concepts, Google and understand them.

[0] - http://www.amazon.com/dp/8177583581

[1] - http://www.amazon.com/dp/1848000693

[2] - https://www.coursera.org/course/algo

[3] - https://www.coursera.org/course/algo2

[4] - http://www.spoj.com

[5] - http://uva.onlinejudge.org

[6] - http://hackerrank.com

[7] - http://www.topcoder.com

[8] - http://www.amazon.com/dp/0201558025

brudgers

I would also recommend Roughgarden's Coursera classes, however, I would strongly recommend waiting for a live session.

A book I think is informative from a practical perspective is Algorithms in a Nutshell from O'Reilly Press. As always with Amazon I would look for a used copy.

avinassh

But no need to wait at this moment, as class is live. However I also agree that live session is recommended and actually fun. Some of the Community TAs are really good, which one will miss if attended non-live version of class.

There are plenty of very good MOOCs on algorithms -

1. https://www.coursera.org/course/aofa

2. https://www.coursera.org/course/algs4partI

3. https://www.coursera.org/course/algo

4. https://www.coursera.org/course/algs4partII

5. https://www.coursera.org/course/algorithmicthink

bigb9320

Which of these would you recommend for someone who has been programming since 2 years but wants to improve their fundamentals ?

prometheuspk

I'd go for aofa

If you're familiar with online courses, then you probably know Coursera, but there are two decent algorithm courses that cover a lot of good stuff about data structures and algorithms starting again in the new year. You can check them out on these pages:

https://www.coursera.org/course/algs4partI https://www.coursera.org/course/algo

https://www.coursera.org/course/algo https://www.coursera.org/course/algo2

Coursera has both Sedgwick's lower division sequence in Java and Roughgarden's two class upper division sequence using whatever language the student chooses.

https://www.coursera.org/course/algs4partI

https://www.coursera.org/course/algo?from_restricted_preview...

There are also upper division courses by Sedgewick as well.

My high school math teacher used to say math is like handcraft. I'm a lousy student but if you have the discipline and will to learn something I'd look at where you tap out in the chapter and try to learn that. Math is based on a lot of concepts. You have to solve the problem sets in order to grasp a lot of concepts. A lot of books are very dense and theoretical. Start small. Read the college textbooks for the algorithm courses and try to solve the problem sets on your own. If you are stuck join some communities. There are subreddits and forums dedicated to math. If you ask there kindly with a concrete problem and your efforts you'll get an helpful answer. That's the only thing that works for me: Solve the problem sets on your own. Everything will be easier. And don't take shortcuts. That's at least my experience.

There is: http://en.wikipedia.org/wiki/Introduction_to_Algorithms which is pretty readable.

And there are a lot of MOOCs:

https://www.coursera.org/course/algs4partI

https://www.coursera.org/course/algs4partII

https://www.coursera.org/course/algo

https://www.coursera.org/course/algo2

If you work yourself up from there and solve one problem after another you'll be quite good at these things in a few months time.

Coursera is starting an Algorithm course July 1st if anyone wants to join: https://www.coursera.org/course/algo

According to a staff reply[0] on the forums, your assignments will only submit the output of your programs so you can use any language you'd like in the course. Did anyone do the Scala course that ended last month? This course seems like the perfect place to try out your newly developed functional programming skills.

I've watched the preliminary videos and I've got to say this seems like some really good stuff. If you like programming challenges, you should definitely sign up for this course. All the assignments and video lecturers are available from the start so you can study at your own pace but you need to submit your assignments on time to receive credit.

Also look out for:

- Algorithms: Design and Analysis, Part 1[1]

- Coding the Matrix: Linear Algebra through Computer Science Applications[2]

They're both starting in 12 days on July 1st.

[0, You may need to be enrolled and logged in to view this thread] https://class.coursera.org/optimization-001/forum/thread?thr...

[1] https://www.coursera.org/course/algo

[2] https://www.coursera.org/course/matrix

Dec 03, 2012 · 4 points, 0 comments · submitted by dhawalhs
Nov 14, 2012 · vitalique on Algorithms [pdf]

Since algorithms are always a hot topic here at HN, I'd like to point out to those interested two online courses that are going to start at Coursera soon, both are continuations to previous courses and both are starting in about two weeks (come December): 'Algorithms, Part II' - by Robert Sedgewick & Kevin Wayne of Princeton themselves [1], and 'Algorithms: Design and Analysis, Part 2' - by Tim Roughgarden of Stanford [2]. Online courses tend to be by far not as rigorous as books are, but I took first part of Prof. Roughgarden's course and it was very enjoyable on all sides.

[1] https://www.coursera.org/course/algs4partII [2] https://www.coursera.org/course/algo2

Coursera has several algorithm classes. I took Design and Analysis of Algorithms I ( https://www.coursera.org/course/algo ) from Stanford last spring. I thought it was really good, reviewed it here: http://henrikwarne.com/2012/05/08/coursera-algorithms-course... . There is also another algorithm course from Princeton on Coursera.

Class central ( http://www.class-central.com/ ) is a good resource for seeing what is about to start.

Ah, it was linked to on the part 2 course page: https://www.coursera.org/course/algo

Jun 03, 2012 · 8 points, 0 comments · submitted by llambda
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
HN Academy is an independent project and is not operated by Y Combinator, Coursera, edX, or any of the universities and other institutions providing courses.
~ [email protected]
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~