Hacker News Comments on
Algorithms, Part II
Hacker News Stories and CommentsAll the comments and stories posted to Hacker News that reference this url.
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:
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.
⬐ 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.