Data Structures: The starting

Data Structures: The starting

I have recently started to learn data structures and algorithms. For this blog, I will sum up some basic things about Data structures.


As you step into the world of tech, you might have heard many people mention DSA i.e. Data Structures and algorithms. DSA this, DSA that, how DSA is important for interviews? is DSA tough? and many more overrated questions that flood this market. Before addressing these, let's hit rock bottom with the most basic question. What is DSA?? for now, what is a data structure?

What is a data structure?

A data structure is a particular way of arranging data In computer systems, to manage, access and update data effectively.

Instead of random grouping of data, it is maintained in a particular data structure, which allows for quick optimisation and gives the ability to apply different data operations, depending on which data structure you choose to arrange your data.

There are different types of data structures, each being unique in its own ways and having different pros and cons over the other. Some examples are arrays, linked lists, stacks, queues, trees, graphs etc.

Why do we need a data structure?

Imagine you want to find the meaning of a word. Here, have this book... it contains the meaning of every word known to mankind, the only problem is, the words were added as they were discovered, so it's completely random. If you have a great enthusiasm and hours to spend, Good luck!

Now let me give you another book. In this book, all words are arranged in alphabetical order. it won't even take you a minute to reach your desired word. This is how just by arranging data in a particular manner, we can significantly boost our efficiency in real time.

Data structures can:

  • improve code efficiency

  • make data more accessible and updatable

  • improve problem solving in real time

  • allow better memory management

  • solve space and time complexities

  • allow algorithms to be executed on a set of data

An array is a popular data structure and unlike other data structures, it is in build in most programming languages. Data can be arranged in a tabular form, and allocated in consecutive memory blocks. Data can be accessed by calling its index number starting from 0 to n-1, where n is the total number of memory blocks. It allows for very easy access to data but is not very memory efficient.

Similarly, various data structures have different pros and cons to offer.

Abstract: data structure and data type

An abstract data structure is the concept of hiding all the implementation details on a given data. It is basically a conceptual representation of how data will be managed and what operations can be used on it. It is like your rough work when solving a maths problem, but instead of a maths problem, you have a real time problem to solve.

An abstract data type or ADT, is a concept of creating a data structure of a certain behaviour, along with the operations that can be performed on it. Programming languages offer built-in data types, like int, float, char etc. Each of these data types can be used to store a certain type of data, for example- numbers in int, decimal values in float, a single character in char, etc. We know how to use them but we do not know how is data actually stored in these different data types. Just like this, we can create our own ADTs to manage a particular type of data.

ADT is a structure/class that is defined to handle a particular set of data, along with the operations that can be applied on this data set. We only mention the operations we can use, without specifying any implementation details.

The user only needs to know what the data type can do, and not how it will be implemented.

Thank you for reading!


Subscribe to my newsletter!

My GitHub