hn.academy

Online courses recommended by Hacker News users. [about]

Algorithms, Part I

Coursera · Princeton University · 14 HN citations

This course covers the essential information that every serious programmer needs to know about algorithms and data structures, with emphasis on applications and scientific performance analysis of Java ...

View on Coursera
The vast majority of the courses listed here on HN.Academy are available from their providers for free. Many courses offer a completion certification for a fee. A few courses and specializations require an enrollment fee. HN.Academy receives a referral commission when you visit course pages through links on this site and then purchase courses and completion certificates. If you decide to purchase a certificate or course the commission does not increase the cost of the course and helps support the continued existence of HN.Academy which is much appreciated.

Hacker News Comments about Algorithms, Part I

All the comments and stories posted to Hacker News that reference this course.
Nov 24, 2018 thanosnose on From Nand to Tetris: Building a Modern Computer from First Principles
> I wonder if there are similar courses on CS algorithms for people who didn't study CS in college.

This might be a bit more challenging and less hand holding than the nand2tetris course but if you are up for it, why not go with the best? Sedgewick Algorithm book has been one of the standard algorithm books in universities for a long time.

https://algs4.cs.princeton.edu/home/

https://www.coursera.org/learn/algorithms-part1

https://www.coursera.org/learn/algorithms-part2

Nov 14, 2018 indigochill on Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems
If you prefer watching videos/working through a MOOC for this stuff, I can highly recommend Robert Sedgewick's Algorithms I on Coursera: https://www.coursera.org/learn/algorithms-part1

If you don't know his name, you should - he's written some of the best books on these algorithms and his MOOC is similarly rich in visualizations and concrete examples that help you develop the intuition for the algorithms. Also incidentally his doctoral advisor was Donald Knuth, who he evidently learned a lot from.

Oct 11, 2018 rolleTx on Ask HN: How to best teach algorithms and data structures?
maybe take a look how he teaches: https://www.coursera.org/learn/algorithms-part1
Aug 29, 2018 ninjakeyboard on Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
Good for you young jedi. I started coding around that age as well. I made the mistake of not going through comp-sci but have still been able to work for Google, publish books, lead teams and companies and products. You'll do just fine.

You have the ability to write some code! If you want to get a jumpstart, you should take the princeton algorithms course (for free!): https://www.coursera.org/learn/algorithms-part1

Or read the textbook by sedgewick that accompanies the course. https://algs4.cs.princeton.edu/home/

There is very little math in there - it may take some elbow grease and mentorship to help to convey some of the ideas - but I believe that you could implement and solve most everything in there. That was my path - I had a teacher at the age of 14 who would explain to me how different algorithms worked and I would go and implement them. Drawing a circle (in memory - it was in C!) or sorting a list (we did bubblesort first IIRC!)

I think you could do it! I believe in you! The course material is approachable - much more so than basically every other algorithms/data-structures material I've found. it may take you some time but you'll be soooo far ahead with your thinking about code.

If you ever start working with Object oriented languages like Java, another book that may help you when you've gone down the road a bit is the Head First Design Patterns book. http://shop.oreilly.com/product/9780596007126.do It's very easy to read, mostly pictures. It is made to be very easy to read (all of the books in that series are so look around at them.)

It's helpful to do both - code and also take in some material, but at 12 I imagine some of the material may be a bit daunting. You're doing really well - keep it up.

Jul 02, 2018 justinclift on Timsort is a sorting algorithm that is efficient for real-world data
> If you come up with a fast sorting algorithm how would you go about making a case it's faster than currently used ones on real world data?

For analysing sorting algorithms - and related things which that leads into - there are established ways to determine their best, average, and worst case runtimes for input of a given size.

If you're interested in learning this stuff, the video's here are useful and not math heavy:

https://www.coursera.org/learn/algorithms-part1

Technically it's explained using java. But it's mostly done using primitive data types (eg int, float, byte, ...).

So it's very easy to follow along and copy the implementation, but translated to a different language (Go in my case, as I don't do java at all).

Jun 17, 2018 ninjakeyboard on Ask HN: How to not fail on coding interview questions?
Interviewing is its own skill!! To get into eg Google you have to go through the rites of passage of learning to interview. That's not true of all positions. I give take-away assignments now. I want to see you can turn in good code. That's all I really care about. How you get there doesn't matter, your decisions do.

The Golden Rule: When in doubt, use a hashmap. Almost all code challenges are about finding an algorithm or datastructure to fit the problem/solution. Many of them are solvable efficiently via a hashmap.

Preparation

- Practice on a whiteboard

- Do mock interviews with the most skilled people you can find and get feedback! This is critical to glean any information about how you're actually doing! I could volunteer to do that for you remotely if you like. Send me your contact info. I'm a distributed systems guy but could walk you through some problems and tell you how you're doing with whatever you're using for tech very likely still. Drop a note on how to connect if you're comfortable.

- Take an algorithms course before you interview. (The princeton sedgewick one is great and easy to grokk. see coursera: https://www.coursera.org/learn/algorithms-part1 )

During:

- Write tests for your code during the interview to demonstrate production quality code.

Especially if interviewing for eg Google. They don't give super tricky problems in every interviews (eg during phone screen) - focus on writing good code that is tested and will compile and run after the interview, not writing mediocre code fast.

- It's okay to incrementally improve your solution. Talk through your thinking. Start at the naive solution and then work toward optimal. Eg give two lists, find any number from list a sums to any number from list b. To start, you could write a couple quick tests on the board to make sure you understand the problem. Then you could reason about solutions - say you could use nested for loops. That's O(n squared) which isn't suitable as a solution. So you ask if the data is sorted. If they say no, you can sort lists, iterate through one and binary search on the larger list to get to an asymptotically linearithmic solution. That's suitable so you write that fairly swiftly. To improve you discover you only need to sort one list so you change the solution to only sort the larger one and iterate through the smaller. If there is extra time you might start to reason about how you can move toward a linear solution. Remember I said the golden rule is use a hashmap? Why don't you make a hashmap out of one of the lists and iterate through the other one to find values in the map? Don't just sit there and take it away to the corner and try to solve it.

God Mode: - WAYYYY before you take the interview: Stop using an IDE at work if you're working in a statically typed language. Use emacs, or vscode or whatever you fancy. Moving to emacs made my brain learn the qualities of the language at an intimate level faster than anything else. You check the docs if you forget the api until you stop forgetting the API. It slows you down a bit at first so it's an investment but whatever - tack 25% on your estimates for a few weeks. You can revert to the IDE for larger refactoring work.

Apr 03, 2018 allanbreyes on Ask HN: What are the best MOOCs you've taken?
https://www.coursera.org/learn/algorithms-part1
Feb 21, 2018 ninjakeyboard on Ask HN: What's the best algorithms and data structures online course?
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
Jan 11, 2018 khuss on Ask HN: How do I prepare for an interview for AMZ/GOOG/APL/FB?
Focusing on a limited set of resources in a way that exercises your problem-solving skills would be the key. Here is one plan:

1) Select a category such as "stacks and queues" from the Cracking coding interview (CCI) book and read all the questions. This will give you a sense of the type of questions being asked.

2) Sign up for the algorithms 1 and 2 courses ( https://www.coursera.org/learn/algorithms-part1 , https://www.coursera.org/learn/algorithms-part2 ) in the audit mode(free). Pick the correct modules such as "stacks" and "queues" and watch all the videos.

3) Come back to the questions in the book CCI and try to solve the problems yourself. If you get stuck, look at the solutions for hints but still try to do them yourself.

4) Do the same for all major topics such as strings, linked lists, recursion etc.

Unfortunately, you are not going to remember all of you've learned. You need spaced-repetition so repeat the above method 2-3 times for each topic.

Once you have the foundation, you will be able to tackle the harder questions that you may find somewhere else or in the interview.

Jun 18, 2017 partycoder on Data structures and algorithms problems collection in C/C++
I've used sites like these when I am stuck with a problem and I would like a hint. But learning the theory is important. The resources I've used recently to train myself are:

- Competitive programmer's handbook: https://cses.fi/book.html

- InterviewBit: https://www.interviewbit.com/

- Sedgewick's DS&A course/book https://www.coursera.org/learn/algorithms-part1 http://algs4.cs.princeton.edu/home/

A similar site, with C++ using [some] STL can be found here: http://www.techiedelight.com/data-structures-and-algorithms-...

Jun 06, 2017 cessor on Ask HN: What language-agnostic programming books should I read?
Good advice! I have an older version, in which the implementations are explained in Pascal. I understand that newer issues cover java. I'd believe the book goes well with his coursera course:

https://www.coursera.org/learn/algorithms-part1

Feb 20, 2017 MisterPC on The Programming Interview from Hell
Robert Sedgewick's course [1] and associated book/booksite [2] have a good overview of Union-Find problem and various algorithms to solve it.

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

[2] http://algs4.cs.princeton.edu/15uf/

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/

Feb 15, 2017 bhu1st on Algorithms
Here is Princeton's Algorithm text I've found useful (The code is in JAVA though): http://algs4.cs.princeton.edu/home/

Pair this up with this excellent lecture by the authors Sedgewick and Wayne: https://www.coursera.org/learn/algorithms-part1/home/welcome

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 managed or owned by Y Combinator, Coursera, edX, or any of the universities and other institutions providing courses.
~ [email protected]
;laksdfhjdhksalkfj more things
hn.academy ~ Privacy Policy ~