Hacker News new | ask | show | jobs
by game_the0ry 1135 days ago
Forgive me for the ignorance (I'm a front end dev), but can someone explain to me why this made it to the front page of hacker news when there are already many resources for learning data structures?

I feel like I could just go through the docs for for java / kotlin collections lib and cracking the code interview, and get a good understanding of DS / algos. What would this offer beyond that?

(this is a genuine question, btw, no sarcasm, there is something here that is resonating with other folks, but not me and I would like to know what that is)

4 comments

> I feel like I could just go through the docs for for java / kotlin collections lib and cracking the code interview, and get a good understanding of DS / algos. What would this offer beyond that?

Reading the Java standard library documentation will teach you what pre-made data structures are available to you, but will not teach you how they work under the covers, or why they work. Reading Cracking the Coding interview will help you use data structures and algorithms specifically in the context of applying for jobs. If you want a deeper understanding you should do a course/tutorial/book that is more focused on the fundamental problem solving techniques like the linked Berkeley course.

In the book realm, I recommend Grokking Algorithms for a gentle introduction, or Algorithms by Sedgewick and Wayne for a deeper understanding. My own book, Classic Computer Science Problems in Java, is a gateway to the wider world of computer science. Yet, for sure this deeper understanding is not necessary for the majority of day-to-day dev work. However, if you have a curiosity, want to work on more fundamental problems, or be sure that you are always doing things the most efficient way possible, it is necessary.

CTCI is not really useful for learning data structures, and I personally don’t think it’s a great book for learning how to interview either. Leetcode IMO is more effective, and once you feel comfortable I would look at classes like 61B and 170 (another Berkeley CS class) because they teach you the details of how data structures and algorithms work.
> I feel like I could just go through the docs for for java / kotlin collections lib and cracking the code interview, and get a good understanding of DS / algos. What would this offer beyond that?

It offers video lectures -- did you look at the link?

Not everyone learns the exact same way. Maybe this is upvoted because people (on aggregate) prefer the course's contents over reading through Java libraries?

Also, honestly, language libraries can be hit-or-miss in terms of algos since they reward optimization over simplicity. Python's standard sort (apparently Java's too?) for instance is Timsort [1] — not necessarily what you want for an introductory course.

----------------------------------------

[1] https://en.wikipedia.org/wiki/Timsort

Data structures are often the key to making things fast. Knowing which and why is important. Courses like this are also very well organized and delivered making time spent learning this content more rewarding.