A data structure is a way of organizing data so that it could be used efficiently. It is a way of structuring data so that it could be later on accessed, queried and updated quickly.
- Data Structures are essential ingredients in creating fast and powerful algorithms.
- They help to manage and organize data.
- They make code cleaner and easier to understand.
Data structures are the mark of an OK product and an outstanding product.
Before leaping further lets first understand the difference between Abstract Data types and Data Structures.
An abstract data type is an abstraction of a Data Structure which provides only the interface to which a Data Structure must adhere to. The interface does not give any specific details about how something should be implemented or in what programming language.
For Example – Mode of transportation between 2 points A and B. Now there can be many modes, like Walking, Cycling, Biking etc. Here we want to reach point B from point A through some mode is an abstract Data type while the mode itself is Data Structure.
Left side we have Abstract Data Type which only tells how the implementation is done while Right hand side is the actual Data Structure which is the implementation of the Abstract Data Type. From here i will use “ADT” for Abstract Data type and “DS” for Data structure.
Note : ADT only defines how the DS should behave and what methods it should have but not the details surrounding how those methods are implemented.
So now we have understood that what are Data Structures and how are they different from Abstract Data types. We now move onto the “Complexity Analysis” which is necessary to understand the Data Structures completely.
Link below to my next blog over “Complexity Analysis”
Happy Coding 🙂