Data Structures & Algorithms Part 1 (Introduction)

Aditya Jagtap
2 min readSep 11, 2021

--

Hola amigos…!!!
From today onwards I'm going to start a new series on topic i.e, Data Structures & Algorithms. Today’s going to be the introductory blog about Data Structures. We’ll cover the topics :
1. Definition of Data Structures.
2. Need of Data Structures.
3. Examples

So let’s jump on our today’s topic.

Data Structures

Basically, you all are wondering about what is Data Structures? So let’s understand it from its definition.

Data Structures is a way of organizing, managing & storing the data in a format by which it can be efficiently accessed & modified.

In short, it can be said as a way in which to store the data on a computer.

Need of the Data Structures

  • Each Data Structures allows data to be stored in a specific manner.
  • Data Structures allow efficient data search & retrieval.
  • Specific data structures are decided to work for specific problems.
  • Allows managing a large amount of data, such as; large databases & indexing services such as Hashtable.

Note: Data Structures are used for easiest management of data.

Examples of Data Structures

Real-time examples :

  • Dictionary
  • Maps

Technical Example:

Array Data Structure :
Let’s see the definition of Array first.

An array is a collection of elements of the same type placed in contiguous memory locations that can be individually referenced by using an Index to a unique identifier.

Ex: int numbers[4] = {10,20,30,40}

Why contiguous memory?

In array, allocation of memory address depends on the datatype. In the above example, we can see that we’ve used int datatype. As we all know int takes up 4 bytes of memory space while allocation. So, in array memory has to be managed according to the data type is used, so here the gap of 4 bytes is maintained throughout the array.
So, if the address for the first value is ‘1000' then for the second it’ll be after the gap of 4 bytes i.e, ‘1004’ and so on.

Conclusion

So that’s it for today guys, let's conclude what we learned today. Today we’ve learned about the Data Structures its examples & their need in the real-time scenario. We’ll go slow and cover all the details of Data Structures & algorithms day by day, so be consistent & stay tuned. See you in the next one.

--

--

Aditya Jagtap
Aditya Jagtap

Written by Aditya Jagtap

Love == Blogs | Tech Explorer | Former ARTH Learner | Active Job Seeker | C++ | Java

No responses yet