Personal Journey to Data Structures and Algorithms (+ Learning Resources)

My thoughts, experiences, and personal resource curations on learning Data Structures and Algorithms (DSA) as a definitely not genius high schooler

Hi folks! 👋 It's good to be back after my high school graduation holiday and college enrollment in Computer Science Major, for which I've been grateful. Consequentially, I researched their curriculum, and when I found out subjects on data structures and algorithms (DSA), I was encouraged to learn them 🔥!

Despite my incomplete learning progress, this article is essentially my thoughts, experiences, and ultimately some resource curations for learning DSA. I hope this article will be useful for you and someone that shares the same background (developer) as me.

First Hands-on DSA

But, before we dive into these resources, I would like to share my experience of getting started with DSA. As I said above, I have been coding since the COVID-19 pandemic, which focused only on project development. In these times, I have met some DSA implementations, terms, and tutorial videos out there! But, since what I used to develop apps are basically libraries like React or Flutter, I do not really need to understand DSA thoroughly to create a production-level app. Thus, I hesitated to learn them and even considered them practically useless. I was pretty sure many developers viewed DSA lightly and focused on their development skills using existing tools.

Until some months ago, on my Flutter project, I encountered an extremely slow function for querying and fetching data from the Firestore database. Jump ahead after I understood Big O Notation (as part of my DSA learning plan), I realized that the function runtime is O(n^2), which could have been improved if I have understand DSA thoroughly.

Since then, I answered my question:

Why do I need to learn DSA if I can develop apps pretty fine without it?

Personally, I thought that learning DSA is extremely useful in practical things such as college exams, developer work interviews, and perhaps solving real-world project problems like the one I have above. Furthermore, learning DSA will prompt us to learn in-depth topics like how computers work, which eventually will improve our logical thinking.

After all, since I am going through the CS Major and eventually will become a computer scientist, it is in my nature I will solve real computational problems that can be traced back to the basics of DSA. In the end, I still agree that being a developer does not necessarily need DSA in their daily life (thanks to existing libraries and frameworks). But, these concepts would be essential if you are going to be a data scientist, software engineer, or a better developer.

The Roadmap and Resources

My personal learning roadmap is based on Abi's DSA roadmap from Instagram (@forgoodcode). His post is thorough and highlights how to learn DSA in 100 Days. But for this roadmap, I don't really agree with the 100 Days concept. Instead, I just tried to be consistent while keeping my own pace.

  1. Day -∞ - 0: C++ 101

    • This is a pretty obvious step because we will use C++ while learning DSA. As Abi pointed out, we need to have a good understanding of pointers and OOP. Trust me, this is important for later!

    • For learning the basics of C++, I personally took (Freecodecamp’s 31 hours on C++). The tutorial here is thorough while explaining crucial topics like Pointers. But, the tutorial is also pretty slow for an experienced coder. For an alternative, I also took the older Freecodecamp’s 4 hours on C++ here (which currently got a blazing 9.1M views!). Furthermore, I highly recommend (Codebeauty’s C++ OOP tutorial) for learning the OOP topic, mainly because of the casual teaching but easy to understand at the same time!

    • While learning these topics, I don’t really practice much with the basics, but mainly on more advanced topics like Pointers and OOP. Feel free and be patient to practice the topics you haven’t understood well.

  2. Day 1: Algorithmic Complexities!

    • This step is all about algorithmic complexity. Abi recommends skipping the complex theories on this topic and focusing on the basics by practicing them until we can deduce the complexity of each code that we wrote.
    • Personally, I took this topic pretty hard because it has clearer conjunction between coding and maths. Since I didn't feel right skipping some of the theories, I ended up learning this topic pretty deep, and eventually understood some of the advanced ones.
    • For the basics, I followed CS Dojo’s short tutorial on Time Complexity, and for the written explanation, I read the time complexity section in The Self Taught Computer Scientist book. If you don't feel right skipping the theories like me, you might want to visit GeeksForGeeks articles and exercises on algorithmic complexity.
  3. Day 2 - 10: Basic Data Structures

    • This step features some of the basic data structures, which are array, linked list, stack and queue. Based on my experience, we can’t take this step lightly because it will uncover some “Oh.. That makes sense!” moments. These moments will be crucial for finding a pattern in other data structures and algorithm design.
    • For this step, I followed the tutorial videos by Mycodeschool on YouTube, which is also recommended by CSDojo for learning DSA. The data structures playlist is pretty aligned with Abi’s roadmap, and I found the tutorial to be very thorough, probably because he teaches using digital sketches, illustrations, and eventually some codes.
    • The most important tactic while learning this step and pretty much every programming tutorial is always to try to code it yourself and don’t just watch the videos. Until now, I also like to try solving the problem firstly by myself, whether it’s still a sketch or pseudocode, which will create a evaluation phase when I watch the tutorial. Moreover, I believe that a tactic called Spaced Repetition is working pretty well to embed the concepts and patterns of each data structure. But remember that our goal is not to remember the code of each data structure!
  4. Day 11 - 25: Basic Algorithms

    • Finally, the step where we get the simple algorithms, which are sorting algorithms, search algorithms, prime numbers and strings algorithms. The details can be referred back to Abi's post.
    • For learning some simple algorithms, I still followed Mycodeschool’s tutorial. But for some supplements, CSDojo and SimpleSnippets channel also provide some relevant tutorials. I also used the same tactics of code it yourself and spaced repetition for this step.
  5. Day 26 - 50: Exercises!

    • After we learned and become comfortable with some of the basics of DSA and its complexity, it is time for the exercise! These practices are usually similar to the actual work interview questions, so it would be very beneficial. Remember to try solving problems that are related to basic DSA!
    • Here are some exercises sites that I used:
      1. GeeksForGeeks Practice
      2. HackerRank
      3. Timus Online Judge
  6. Day 51 - 60: Advanced Data Structures

    • The next step will bring us into some advanced data structures, which are tree, hash table and graph. Still, I used Mycodeschool tutorials and the same tactics as before. Since these data structures are pretty challenging, I recommend you try implementing these data structures that mimic a real-world solution.
  7. Day 61 - 100: Advanced Exercises!

    • This step is about revisiting the previous code exercise sites, but here, we will aim for advanced topics that we've learned.
    • During this long period of learning, I recommend you refresh some basic concepts from the previous step in your casual time. Either by re-code your old implementation, improving its style, or even trying to implement it into a real coding problem!
  8. Day 101 - ∞: Finale

    • In this step, we have technically accomplished our customized roadmap. I totally agree with Abi's opinion that at this stage, we are better than most CS undergraduates. But, this is indeed a long journey beyond 100 Days to master DSA, especially for work interviews, which definitely require other skills, like mentality, and confidence, which can be achieved from more practice. For this work interview step, I recommend FreeCodeCamp's Interview Practices which in my opinion, mimics interview problems the best.
    • For even more challenges, Abi recommends you to try competitive programming. This guide from USACO explained well the basics of competitive programming. You might also want to refer to William Lin's channel, where he uncovers his experiences in competitive programming.

I don't know what I'm doing!

That was a pretty long article, only for capturing my thoughts, tactics, and resources for learning DSA. During all of these steps, try to always ask "Why?" to yourself or Google. Again, our goal here is for achieving a solid understanding of DSA concepts, until we can effectively implement them in our future problems 💡. In the end, I encouraged you to keep going at your own pace and don't ever mind others' journeys, even if what you are currently learning does not make any sense.

Until next time 🍻,

Andre