r/AskComputerScience • u/MilaTheGreatOne • Feb 22 '23
Grokking Algorithms vs The Algorithm Design Manuel vs A Common-Sense Guide to Data Structures and Algorithms
TLDR: Which book do you recommend for beginners: Grokking Algorithms, The Algorithm Design Manuel, or A Common-Sense Guide to Data Structures and Algorithms?
I'm currently learning HTML, CSS, and JS (primarily through TOP) and plan on enrolling in a boot camp in a couple of months (I have three months before the program starts). I heard that learning algorithm is important and will help you become a better developer and help you during the job search. The boot camp doesn't focus on teaching this, so I want to learn it on my own.
I'm leaning towards reading The Algorithm Design Manuel while going over the author's lectures. However, I've recently read wonderful reviews about Grokking Algorithms, and I saw an older post on this sub where people raved about A Common-Sense Guide to Data Structures and Algorithms by Jay Wengrow.
During/after the boot camp, I wanted to go over Cracking the Coding Interview (it's my understanding that this book goes over algorithm problems).
Which of the three books would you suggest for an absolute beginner just getting their toes wet in the CS/programming world?
Edit: Thanks all!
3
u/belaros Feb 23 '23 edited Feb 23 '23
I recommend Sedgewick’s course and book if you’re serious about it. This course also includes a selection of interview questions for each topic.
If you’re very serious, then CLRS is generally considered the top book on the subject. It can be used with the OCW lectures. Note that you don’t actually read CLRS front to back, it includes both basic and advanced topics, so it’s best navigated with lectures.
They’re both introductory courses (second semester), so suited for beginners. If you’re an absolute beginner then you can read Grokking first, or an intro to programming book, or better yet, do CS50.
If you’re not that serious about it (i.e. only care about interview questions), then I’d recommend just going straight to leetcode and learn as you go.
2
u/No_Main8842 Feb 23 '23
Once we have gone through the OCW lectures & CLRS (basic parts based on OCW lectures) how can we move forward to advanced topics ie. Any lectures or roadmap to navigate advanced topics & complete CLRS ?
5
u/belaros Feb 23 '23
Many student's don't go much deeper on the topic of algorithms; but if you want to, you can go on to the following CLRS course, Design and Analysis of Algorithms, and the graduate course Advanced Data Structures goes beyond CLRS. You could also follow Harvard's CS224.
I don't think you're supposed to complete CLRS. At some point you'll reach enough maturity that you can use it as a reference. Section 7 branches out into a wide range of advanced topics, and you could take whole (graduate, usually) courses on these. Advanced courses also tend to rely less on textbooks.
Unless you're really into the topic, I would recommend (as most university curricula do) exploring other CS topics before coming back to algorithms. To name a few important ones: Operating Systems, Networking, Computer Architecture, Compilers, AI. In any of these you'll see algorithms and data structures applied to real problems.
1
u/No_Main8842 Feb 23 '23
Is the basic OCW intro to algo + CLRS enough for Competitive Programming/DSA interviews , or do I need to go deeper (I will anyways go deeper in this subject , but due to time & financial constraints I need to first focus on switching to a high paying job)
2
u/belaros Feb 23 '23 edited Feb 23 '23
Coming up with solutions on the spot is a skill that has to be practiced. You should follow one of the intro courses and practice on leetcode.
Focus on the leetcode if interviews are your main concern. And I would recommend Sedgewick’s Princeton courses (Algs I and II) over the MIT one, since they’re more practical.
3
u/TimeMysterious6967 Apr 17 '24
Im also thinking about buying a book about algorithms.
I think for now, I go with grokking algorithms (~200 pages) because its seems like it's easy to read through, to sort of get started and have some rewards along the way.
And maybe go to The Algorithm Design Manual from there, which covers much more and the amazon reviews say its fantastic. (~700 pages)
2
1
3
u/sgrmru69 Feb 22 '23
Thanks OP