Omkar Bhoir

Posted on

Why we need Data Structures and Algorithms ðŸ¤”

If you are a student you might have heard many a times from your teachers or your seniors that Data Structures and Algorithms are very important topic and if you want a good job you should definitely learn it, right?.

In this post we will learn what is this and also why we need to learn itðŸ˜‰

What is Data Structure?

In simple words, Data Structure is way to organize data in an efficient manner.

Suppose you have a data of your class (such as id, name, email, etc.) and your teacher told you to store that data in a way so that teacher can easily access and modify that data. What will you do? How will you store that data?

Easiest and common way to do this can be to store that data in an Excel file and share that file with your teacher. Nice

Yeah, now you have understood that why we need this Data Structures i.e to store the data in a way that is easier to access and modify.

Now what is this algorithm?

We can define it as a collection of steps to achieve something.

Imagine you have to do addition of two numbers. How will start? Will you directly add numbers? or Will you check if we have given two numbers?.

This is how I will do it
Step 1: Check if I have two numbers, if not request two numbers
Step 2: Now I have two numbers, so I will add that two numbers and display result on the screen

Now you might be thinking, why will I waste my energy in writing this steps if I can do it directly. Yes, of course you can do such small operations directly. But when we have to do complex and large operations, it is recommended that we must first decide how our goal can be achieved.

Enjoy!. Now know what is Data Structures and why we need it and you also know about algorithms.