Data Structures and Algorithms the easy way...
Data structure and algorithms, are another pair of words that you may have heard a lot if you are in any way related to the tech world. Your college syllabus includes it, if you want a job in these big tech companies like amazon and Microsoft or any other tech giant you probably have to study it for a tech role. But what is it and why are companies giving it so much importance?
Data structure! Although this word sounds fancy and complex, it isn’t that way. The word data structure is just a way to describe how computers store and organize memory.
“A data structure is a data organization, management, and storage format that is usually chosen for efficient access to data”
This is the Wikipedia definition of the data structure.
Basically, a computer can store and organize memory in different ways and these ways are nothing but different data structures. I think this much of explanation is enough and of course, we will discuss this later again and again with different examples.
Now let’s talk a bit about algorithms. Another fancy word right? But trust me it is not as complex as you may think. Algorithms are just set of instructions that you give to your computer to execute a task. And yes literally it is as easy as it sounds! Even a program that you may have written to add to integers is an algorithm
Types of Data Structures
So as we talked about earlier data structures are just different ways of storing and managing memory, and in these data structures, there are primarily two types Linear and Non-Linear Data-Strucure.
Linear Data Structure arranges data elements in a Linear order where every element is attached to its previous and next element.
In Non-Linear data structures, data elements are attached in a hierarchical manner
Linear data structures are easy to implement but do not make efficient use of memory.
While Non-Linear data structures are difficult to implement they can make efficient use of memory.
Examples of Linear Data Structure -> Arrays, Linked List, Stack, and Ques
Examples of Non-Linear Data Structure -> Graph, Tree
For more information about Linear and Non-Linear Data Structures, you can refer to this article ->https://www.geeksforgeeks.org/difference-between-linear-and-non-linear-data-structures/
Alright, we talked about what Data structures and algorithms are but why are they important and why do companies around the world even care about them?? Let's find out!
What if I tell you that the applications you are using every day are dependent on these data structures? Yes, Google maps use Graph to navigate you. Facebook Also uses Graph to manage your friends network. Databases are using various data structures as well.
But companies do not include data structure questions in Interviews because they want you to work with Graphs and Tress in your future work, it's because they want to taste your problem-solving capacity. Now developers all around the world debate about this and whether it is the correct way of tasting one or not! Some people think that companies should actually ask questions about actual development, while some think that DSA is the best way to taste the candidate.
But the fact is that even after a million debates if you want a job in one of these big tech companies you will have to study Data-Structures and Algorithms!! So why not begin today? And trust me it is not going to be difficult if you do it the correct way. And trust me on this you will find a lot of good tutorials on YouTube that will teach you more than enough.
This video will get you started and will teach you a lot about Data Structures.
Now off-course depending upon your purpose of learning DSA things are going to change! If you are learning DSA to crack a job interview then you will have to study some standard questions and may have to use websites like Leetcode.
I hope you like this article as a beginner's guide to DSA because that was my first intention! And off-course the internet is your best friend if you want to dive deep into the DSA world there are more than enough resources available! All the best and keep growing :D