Learning to Love Data Structures and Algorithms: A Key Milestone in My Coding Journey
There's a subject that often looms ominously in the hearts of many budding developers: Data Structures and Algorithms. To many of us, it's an arduous journey filled with intricate logic puzzles, complex designs, and endless jargon. And to some extent, it feels divorced from the real-world application of programming. Yet, today, I have taken my first tentative steps towards embracing this subject and understanding its immense value.
My day started with an attempt to solve a HackerRank problem. The task seemed simple: given an array, construct a new array representing the frequency of each value. For example, given the array [1,1,3,2,1], the output should be [0,3,1,1]. The first number is 0 since no zeroes exist, the second number represents 3 instances of '1', the third number shows 1 instance of '2', and so on.
I spent two hours wrestling with this problem, trying to extract logic from what seemed like an insurmountable task. The process was challenging, but once I cracked the code, instead of my usual triumphant satisfaction, I felt a dull sense of exhaustion. I couldn't help but ask myself, "why am I finding this so hard?"
So, I set out on a quest to find the answer. A deep dive into various videos, tutorials, and blog posts all pointed to one solution: mastering Data Structures and Algorithms.
Spurred on by this revelation, I invested a couple more hours into studying the main data structures. It was during this time that I stumbled upon Pooja Dutt's video: How to ACTUALLY Master Data Structures FAST (with real coding examples). It's an excellent resource that breaks down the basics of Data Structures in an accessible and easy-to-follow way.
I won't pretend that I fell in love with Data Structures and Algorithms instantly. But as I delved deeper, I could feel my confidence growing. I realized that these logic problems were not a distraction from real coding, but instead, a significant aspect of it. By better understanding these concepts, I was equipping myself with the necessary skills to approach coding problems more efficiently and effectively.
These subjects may not seem directly applicable to everyday coding tasks. You might not always need to implement a binary search tree from scratch or solve a complex sorting algorithm. However, these topics foster logical thinking and problem-solving skills, and that's invaluable. They make you a better programmer, one capable of tackling any coding problem that comes your way.
While I still have much to learn about Algorithms and more complex data structures like databases, I am committed to this journey. I am still focusing on Python and exploring Tkinter to better understand GUIs. Java continues to loom in the background, an inevitable part of my future learning. But for now, I am content in the knowledge that every problem I solve, every concept I grasp, is another step towards becoming a competent and confident developer.
Learning to love Data Structures and Algorithms? It might sound like a tough ask, but I'm on my way. Here is hoping it will be worth it 🤞