Skiena's Algorithm Design Manual - It gives you an overview of what classes of problems exist and how real world problems can be expressed as instances of them. It doesn't always give you the step-by-step directions of how certain algorithms work, but it gives you enough of an overview to understand the problem and points you towards existing implementations.
It's certainly one of the most useful books I used when preparing for interviews (and comes in handy in the real world as well). As an anecdote, in one interview at a big-N company, I was presented with a problem, said "based on these factors I'd treat this as a network flow problem by doing X", and that was the only buzzword needed - rather than watch me try to write a solution to a known problem, we were able to move on to other questions. Without knowing that term, I probably would have spent the remainder of the interview trying to optimize a solution to the problem instead.
I enjoyed The Algorithm Design Manual, as someone that's self-taught. Skiena has a good mix of war stories and visualizations that most algorithm texts lack.
He can still go a little overboard with the math-adjacent variable-naming and notation at times, but it's also usually explained visually or concretely elsewhere in a way that makes the abstract form easier to work through.
Honestly, this is probably a bit of a tough problem for someone without a decent background in data structures and algorithms. If you're feeling lost, I'd encourage you to work on problems that are a little simpler initially.
You don't need to take a formal class to learn this stuff, but you should be aware that most people who can solve problems like this will spent a semester learning the tools used here.
If you're interested in self-study, I'd recommend Skiena's Algorithm Design Manual. It covers, among (many) other things, backtracking algorithms, and, I think, Knuth's dancing links algorithm. I personally never took any CS classes, and found the book really fantastic for catching me up on a surprisingly large fraction of what actual CS majors know.
I spent some time spinning my wheels on leetcode. It was not two years of daily study like the other comments suggested, but enough that I realized it wasted after I tried another tactic: I got an algorithm textbook (this one that dove into the fundamentals of why these algorithms worked. Hacks with hashmaps and two pointer solutions are easy to get once doing enough of them, but learning nuances of common graph algorithms/ DP and why the can prove certain properties was super helpful
this is my go to book when prepping for interviews: https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202
the whole book is framed around pattern recognition of common CS problems and options for solutions to those problems. It's a great way to practice for interviews where you have little idea what type of problem you're going to be presented with and will be expected to think quickly.
Data structures and algorithms are definitely useful. So is math and general problem solving techniques. There are some books for competitive programming you might wanna check out, like https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202 (I haven't read it.) Language doesn't matter so much for competitive programming, especially if you are practicing. If you enter a competition you might be better off with a faster language, but that depends on the competition.
Sounds like you could use a good foundation in data structures and algorithms. I'd find a book on the subject and dive in.
My recommendation: The Algorithm Design Manual by Skiena.
Link: https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202
> Also, I think it's still really important to know the fundamental CS stuff, whether or not it's actually used in the day-to-day. Otherwise you're making a living with tools you don't fully understand, not to mention I had to explain Big O notation on a screening for one of my first software jobs.
what does this have to do with being self-taught versus university-educated?
reading something like this and other books like it is cheaper and faster than going to a university.
not everyone needs to pay a bunch of money to be spoon-fed information that they could read in a book in order to learn.
please, keep downvoting me for posting the factual information that one can learn about algorithm design from a book.
I have been seeking the same, and recently found this book: http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202 . It's incredible, so far. It's grounded with real-world examples ("War Stories") combined with rigorous theory (e.g. summation formulae proofs) in a manner that eases my mind like no other algorithm-resource has. I hope you like it as much.
I really like The Algorithm Design Manual by Steven Skiena.
copy and pasted some resources I've posted here before:
What I did a few years ago after graduating from college in CS to brush up on my coding + data structure + algorithms knowledge was the following:
Read the Algorithm Design Manual.
Go through some of the challenges on this interactive python algorithms website.
Practice coding simple and then more advanced algorithms on sites like Coderbyte (my site) and HackerRank which provide good explanations and solutions as well. Here's a list of popular coding challenge websites in 2017.
Read as many algorithm explanations and code examples as you can on GeeksforGeeks.
Try and implement basic algorithms yourself like: shortest path, minimum spanning tree, DFS + BFS, tree traversals, different sorting algs, min/max heap, etc. and learn about their running times (big-o).
Look at some interview questions posted on careercup and try and understand how other users solved the questions. Like this example.
Aside from coding challenge sites, try and solve common coding interview questions you find online such as this list.
Eventually when you get a coding problem it will be sort of like a switch going off in your head because you will have had so much practice with different types of algorithms and data structures that you'll be able to reduce the problem into a simpler problem you've done before. This is especially the case with dynamic programming problems. Once you've completed like 50+ DP challenges and understand how they work, you'll be able to solve (practically) any DP problem because they're all very similar.
I also wrote a recent article on this topic which you can view here: Improving your Algorithms & Data Structure Skills
I used to be horrible at algorithms but good at coding/programming. I simply couldn't wrap my head around the abstractness of it all. What helped me was spending hours every day working through problems for half a year. I intentionally picked the problems I knew I would struggle with since it would push me to figure it out. What really matters is investing time in working out problems. No matter how many videos you watch or books you read, you have to work out problems to learn. Preferably work them out in paper before coding them since a big part of algorithms is abstraction. If you can't abstract the problem it makes it much harder to apply in code. Sure, you might know how to code a solution to the Range Sum Query in Python but if you can't write the solution in paper w/o code then it'll be difficult to see how to extend it to solve the Maximum Sum Rectangle even though they're just tweaks of the same problem.
Now for useful resources I wish I had back in the day:
Hopefully you find this useful.
The Algotitms Design Manual by Skienna helped me a lot.
I was also curious about this one.
Also, this site may help :)
Ah, the Bible of Algorithms. It's a good reference but never understood why many professors use it as an introductory textbook when it assumes some previous knowledge despite saying otherwise. The Algorithm Design Manual by Skiena offers better explanations along with a short intro on math notation but might still be problematic without any background. Schaum's Outline of Discrete Mathematics has a good overview of discrete math with lots of practice problems. Other than that it might be difficult finding a good book since they tend to be all over the place on what they consider 'discrete math'.
In almost every field, you're going to end up dealing with groups of things - lists of contacts, groups of users, categories of billing items, whatever. Having a deep understanding of arrays vs. (hash) sets vs. (hash) maps is huge, by far that's the most common decision I make on a day-to-day basis.
I think it's worthwhile to expose yourself to a bunch of specialized algorithms and data structures. You don't need to study them all super in-depth, but reading about them and maybe hacking them out in Python/Java/C++/whatever is a great learning exercise. I personally like "The Algorithm Design Manual" by Steven Skiena, (EDU PDF, Amazon). It's on the dry side, but it categorizes algorithms into a handful of types (sorting, graphs, combinatoric search, etc) which makes it great reference material for learning.
A handful of useful exercises, maybe useful:
> "Dynamic Programming", "Linear Programming" or "Operations Research", that were mentioned in some threads, are terms I've never even heard about.
If you haven't heard of dynamic programming, then it's not surprising you're struggling. Many of the later problems are easy to solve if you know the trick, and for most of us, most of the time, knowing the trick comes down to recognizing something we read in a textbook.
People who do well on the later days have, pretty much without fail, gone through at least one algorithms textbook and really mastered the material there. Jumping into the later days of AoC is a lot like taking a multi-day exam in algorithms. It would be pretty nuts if you could do well on that without studying it first.
If you do want to learn this stuff, get a textbook! I really like Skiena's Algorithm Design Manual. I've never taken a comp-sci class in my life, but most of the later days in AoC I'm basically just using one of the things I learned from that book.
If you're concerned about interviewing, and haven't already worked through it Cracking the Coding Interview is a fantastic resource. It'll also help you do better on AoC. Read Skiena first though - Cracking the Coding Interview is more of a practice resource for people who have already studied algorithms, not a first course.
+1 on the book and practice. I took the undergrad course in 1999 in C++ but didn't really "get it" until a few years working and using the above book. The pseudo code examples were much easier to follow than the prior C and math heavy books. I still use it for reference in addition to this book: https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202
Pra quem não prestou, esse livro é excelente: https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202
This is a pretty good practical no-nonsense introduction: https://www.amazon.com.au/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202
I like Skiena's Algorithm Design Manual.
Jeison Higuita recomienda este libro para algoritmia y competitive programming: Competitive Programming
Esteban Foronda recomienda este libro para algoritmia: The Algorithm Design Manual
You gotta start somewhere! I'm glad that you are taking the programming classes. Programming is fun, and challenging, you'll see. For starts, just go through your course and pay close attention to (a) algorithms and (b) data structures. If you find it hard to understand, just come back here or go r/learnpython. We are here to support you. Also, if you prefer books, i recommend this one - he talks through the concepts from problem solving and steps through psuedo-code before writing a functioning program. If you prefer an online experience, try all the easy problems on leetcode, don't get intimidated if you don't get the solutions, don't be afraid to peek at hints and solutions.
copy and pasted some resources I've posted here before:
What I did a few years ago after graduating from college in CS to brush up on my coding + data structure + algorithms knowledge was the following:
Read the Algorithm Design Manual.
Go through some of the challenges on this interactive python algorithms website.
Practice coding simple and then more advanced algorithms on sites like Coderbyte (my site) and HackerRank which provide good explanations and solutions as well. Here's a list of popular coding challenge websites in 2017.
Read as many algorithm explanations and code examples as you can on GeeksforGeeks.
Try and implement basic algorithms yourself like: shortest path, minimum spanning tree, DFS + BFS, tree traversals, different sorting algs, min/max heap, etc. and learn about their running times (big-o).
Look at some interview questions posted on careercup and try and understand how other users solved the questions. Like this example.
Aside from coding challenge sites, try and solve common coding interview questions you find online such as this list.
Eventually when you get a coding problem it will be sort of like a switch going off in your head because you will have had so much practice with different types of algorithms and data structures that you'll be able to reduce the problem into a simpler problem you've done before. This is especially the case with dynamic programming problems. Once you've completed like 50+ DP challenges and understand how they work, you'll be able to solve (practically) any DP problem because they're all very similar.
I also wrote a recent article on this topic which you can view here: Improving your Algorithms & Data Structure Skills
copy and pasted some resources I've posted here before:
What I did a few years ago after graduating from college in CS to brush up on my coding + data structure + algorithms knowledge was the following:
Read the Algorithm Design Manual.
Go through some of the challenges on this interactive python algorithms website.
Practice coding simple and then more advanced algorithms on sites like Coderbyte (my site) and HackerRank which provide good explanations and solutions as well. Here's a list of popular coding challenge websites in 2017.
Read as many algorithm explanations and code examples as you can on GeeksforGeeks.
Try and implement basic algorithms yourself like: shortest path, minimum spanning tree, DFS + BFS, tree traversals, different sorting algs, min/max heap, etc. and learn about their running times (big-o).
Look at some interview questions posted on careercup and try and understand how other users solved the questions. Like this example.
Aside from coding challenge sites, try and solve common coding interview questions you find online such as this list.
Eventually when you get a coding problem it will be sort of like a switch going off in your head because you will have had so much practice with different types of algorithms and data structures that you'll be able to reduce the problem into a simpler problem you've done before. This is especially the case with dynamic programming problems. Once you've completed like 50+ DP challenges and understand how they work, you'll be able to solve (practically) any DP problem because they're all very similar.
I also wrote a recent article on this topic which you can view here: Improving your Algorithms & Data Structure Skills
[copying my comment from a similar thread]
What I did a few years ago after graduating from college in CS to brush up on my DS + Algs knowledge was the following:
Read the Algorithm Design Manual.
Go through some of the challenges on this interactive python algorithms website.
Practice coding simple and then more advanced algorithms on sites like Coderbyte (my site) and HackerRank which provide good explanations and solutions as well. Here's a list of popular coding challenge websites in 2017.
Read as many algorithm explanations and code examples as you can on GeeksforGeeks.
Try and implement basic algorithms yourself like: shortest path, minimum spanning tree, DFS + BFS, tree traversals, different sorting algs, min/max heap, etc. and learn about their running times (big-o).
Look at some interview questions posted on careercup and try and understand how other users solved the questions. Like this example.
Aside from coding challenge sites, try and solve common coding interview questions you find online such as this list.
Eventually when you get a coding problem it will be sort of like a switch going off in your head because you will have had so much practice with different types of algorithms and data structures that you'll be able to reduce the problem into a simpler problem you've done before. This is especially the case with dynamic programming problems. Once you've completed like 50+ DP challenges and understand how they work, you'll be able to solve (practically) any DP problem because they're all very similar.
I also wrote a recent article on this topic which you can view here: Improving your Algorithms & Data Structure Skills
Have you checked out The Algorithm Design manual by Skiena? That's the one I keep seeing recommended for interview preparation. It's easily findable online and can buy it new/used for $50/$80
I like The Algorithm Design Manual: http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202
I'm a huge fan of the book The Algorithm Design Manual.
> What I recognize though is that I'm missing something, and that is a deep intuition for algorithmic thinking.
.
> I finished an intro to data structures and algorithms course.
.
> I'm looking less for books or references to archives of algorithms, and more so for specific algols to study.
If you've only just finished an intro course, you're a loooong way from a "deep intuition for algorithmic thinking". At this point, all studying specific algorithms will do is teach you about specific problems. If you want to develop that intuition, it's going to require studying a huge array of problems and algorithms, along with the great pile of theory underlying them.
Try a book on algorithms to start. It likely covers many times more material than your course did.
If you've got the mathematical maturity, something on complexity theory would also be a good idea. It's abstract stuff but for that reason it's also very portable.
If you haven't got the mathematical maturity, pick out an intro to discrete mathematics and work through that.
Or if you're more practically minded, pick a subfield of algorithms - network algorithms, geometric algorithms, optimization, whatever - and find the reference work used in the field. Read through that. What you learn here probably won't be very portable, but that won't stop it being useful. Be warned that depending on the subfield, the "advanced" algorithms used may well be extremely mathematical, so you may well find yourself back at (3).