Hacker News Comments on
Algorithms, Part II
Coursera
·
Princeton University
·
4
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this url.My personal favourite is Sedgewick & Wayne's _Algorithms_.https://algs4.cs.princeton.edu/home/
You can even find an excellent two-part MOOC on Coursera:
https://www.coursera.org/learn/algorithms-part1
https://www.coursera.org/learn/algorithms-part2
Maybe it's not the "purest" class or book, but it's engaging and it lets you understand how algos work AND how to use them in practice.
⬐ cloverichSedgewick is a masterpiece but also overkill for interview prep. Interviews are mostly trivia and for that leet codes volume is your friend. Buy sedgewick for your long term growth but it will stand in the way of any near term interview prep, at least it did for me.⬐ musicaleThe annoying thing as you note is that in the long run Sedgewick >> Leetcode but in the short run it's probably reversed as whiteboard interviews often present algorithm puzzles that are variants of "have you seen this trick before?" and closer to Leetcode questions.I wonder though if "programming contest" (usually more like "algorithm puzzle contest") books like Skiena's might be useful, though I can't help but think that doing an algorithms course first shouldn't be useless.
I like Algorithms by Robert Sedgewick. It's a great book. He also has free online courses based on the books that are of excellent quality:- https://www.coursera.org/learn/algorithms-part1
- https://www.coursera.org/learn/algorithms-part2
There's a website for the book as well, that has code that is well organized and commented.
Unfortunately excellent books like "Programming Pearls" have code examples that use weird naming conventions that just make me just want to punch the wall.
For competitive programming and interviews, Antti Laaksonen's books are fantastic: https://www.cses.fi/book/index.php
⬐ M5x7wI3CmbEem10I’ve heard that Part 1 of the algorithms course is sufficient for new grad interviews. Can you verify?⬐ 29athrowawayI got an interview that involved part 2 (substring search), which I solved using KMP.⬐ M5x7wI3CmbEem10senior interview or new grad?⬐ 29athrowaway⬐ blackrockPhone interview for a senior role, not onsite.⬐ M5x7wI3CmbEem10> I’ve heard that Part 1 of the algorithms course is sufficient for new grad interviewsIt sounds like you got hazed.I still don’t understand why these software interviews do this. Especially when the work in question, is derivative, and mostly just reformulating other ideas and libraries.
It’s like, how often are you going to have to reinvent your own Red Black Binary Search Tree to solve some obscure business problem? Most of the time, the business doesn’t give a damn. Just throw your data into a database, and be done with it. Then use some queries to filter through your data, and get the data you need to solve the problem at hand.
And usually, by looking at someone’s code style, you know how good they really are. You can determine, if (1) they are at a hackerish level and their code has bugs and occasionally breaks, or (2) if their code is really solid software engineering level quality that’s airtight and can survive anything you throw at it.
⬐ 29athrowawayI prefer these interviews rather than take-home projects, which usually take longer and can be cheated.A company once sent me a really long take home exercise that took like 3 full days to implement to completion. I said: no thanks, and in the same 3 days I had multiple interviews and even got an offer.
> 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/
⬐ volkischQuestion: Why not CLRS instead of Sedgewick's book/course?
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.