A dive into Data Structures and Algorithms

A dive into Data Structures and Algorithms

Photo by Chris Ried on Unsplash

Screenshot_20220411-011356-1.jpg

Almost a year ago I made the decision to learn Data Structures & Algorithms. As a self-taught developer, it’s easy to get caught up in the web of writing code and making applications that may give one the impression they are doing a lot and they are good when they aren’t. I wanted to be different, to be better, to write clean and efficient code. I did not want to get caught up in the loop of building apps and shipping them merely because they work. I decided to write software that mattered not just CRUD applications.

And so began the journey of learning Data Structures & Algorithms. A thrilling and very much challenging adventure.

Before we dive in deep, let’s explore what are Data Structures and what are Algorithms, and why they are important in software craftsmanship. Data structures provide the right way to organize information in the digital space. Algorithms are a very important topic in Computer Science because they help software developers create efficient and error-free programs.

I’m quite sure a number of you will agree with me that these are two terms that are often thrown around quite a lot without thinking over much about what they mean.

Data Structure ~ A storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accessed and updated efficiently. There is a plethora of data structures ranging from the all too common Arrays, Linked Lists, Stacks Queues, Hash Tables, Trees, Heaps, and Graphs.

Algorithm ~ A set of well-defined instructions to solve a particular problem. It takes a set of inputs and produces the desired output. There are many different types of algorithms ranging from Simple recursive algorithms, backtrailing algorithms, divide and conquer algorithms, dynamic programming algorithms, greedy algorithms, branch and bound algorithms, brute force algorithms, randomized algorithms, etc.

What experts say about data structures and algorithms?

Smart data structures and dumb code works a lot better than the other way around. ~ Eric S. Raymond; Open Source Advocate and Author

Data dominates. If you’ve chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming.~ Rob Pike; Programmer, Author, and co-creator of Go

I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships. ~ Linus Torvalds; Creator of Linux and Git

My learning journey has been quite fun. Initially, I had planned to learn Data Structures and Algorithm using Java, for no particular reason other than wanting to build Android apps afterwards, but for some reason, I ended up using mostly C++, and by some default setting I just had to use my favourite programming language, Python as well. Yes, I used Java in some places too like in implementing Linked Lists. Lately, I have begun using Javascript as well because ultimately my goal is to work for companies, mostly start-ups that work on interesting problems, and Javascript and Python are in demand for start-ups, it would seem.

In order to be the software developer I envision to be I went ahead and learned data structures and algorithms. I did not stop there however, I went on to learn Algorithmic Thinking, Big O Analysis, Algorithmic complexity (time and space complexity), and much more. I hope to share with you my learning experience thus far. . Have fun learning with me!

Happy hacking!