Conceptually, they are easy. I always avoid spending too much time on them, but then I feel like if I’m conversing with an interviewer or with a friend who could potentially refer me, I am not on point. I’ve taken a DS course. It wasn’t very rigorous. For those who went to top schools, any advice for gaining a reflexive / intimate knowledge of DS? Is there any other route here aside from slogging through an exhaustive implementation for each one over and over until it’s memorized? Some of them have quite an expansive range of methods to implement.
Have you done any leetcode yet? I wouldn’t spend so much time finding different ways to implement. Focus more on using them, a good platform is leetcode and do them over and over and over until it becomes super easy
I would agree - understanding when and how to use a hash map is way more important than how the hashing method works. This has been my approach so far. Just feel not very confident especially with the less trivial ones. Graphs, Trees, SLL/DLL even. Mention a bipartite graph and I will have an idea, but other than that I’m a deer in headlights.
You clearly haven't solved the exercises at the end of each chapter in a textbook like Skiena or CLRS. You probably just read through it and maybe even implemented a few of the DSs from scratch, which isn't sufficient. Anyone can have a conceptual understanding of anything after reading an article or two on HN, but it's just handwavey junk knowledge until you've gotten your hands dirty and know it well enough that you can explain it to a 5 year old and easily know when it's applicable for a leetcode question.
Yeah, I concur. Would you recommend Skiena or CLRS?
Skiena for short-term prep, CLRS for long term study.
Even if you implement data structures from scratch, you won't necessarily have them right unless you run against a large set of test cases. I found two ways to battle-test my implementations of the basics: 1. For a given leetcode question, swap out the standard-library-provided DS or method (i.e., sort etc. ) with your own implementation. 2. Leetcode test cases aren't always that rigorous. Get elements of programming interviews and pull down the associated exercises and test cases from git and run with those
I’m kind of in the same boat I’m going thru the MIT opencourseware on YouTube and in between trying to do applied problems like trying to implement the ds from scratch.