About Article
This article will tell you about the crucial concepts of data structures and algorithms in terms of the understanding list as ADT. This article is the second one in the series “Data Structure and Algorithm (DSA).” You’ll learn more about data structures and algorithms in detail in my coming articles. So stay tuned for the next articles.
Read this article, then feel free to give your feedback.
The topics to be covered are
- Introduction
- What is List
- Abstract Data Type (ADT)
- List as ADT
- Static List
- Implementation of the static list
- Analysis of Dynamic list
- Measuring the time complexity
- Result of analysis
- Best implementation of the list after analysis
Prerequisites of this Article
You should be aware of the concepts of Data Structure and its purpose, ways of implementing it, and its classification. Also, you should have knowledge about time complexity and space complexity, and the ways to analyze the algorithm using different asymptotic notations. All the mentioned topics are clearly described in my previous article. Following is the link to my previous article.
Learn About Data Structures And Algorithms (DSA) – Part One
Introduction
As you have learned, if we want to implement any data structure, then first we have to define its Abstract Data Type (ADT), then we have to provide its implementation. We can say that first, we need to make the mathematical and logical model, then to implement it on the data objects. As we see only the abstract view, we can call this abstract data type ADT.
Abstract Data Type (ADT)
The data and operations on which the data structure comprises are called Abstract Data Type (ADT). In ADT, we don’t give any implementation of the data objects and their operations. We can say that ADT provides us with Data Abstraction. ADT focuses on “what a data structure does” rather than on “how a data structure does”. In this article, you’ll learn the list as ADT and then its implementation.
What is a List?
A list is a common real-world entity and a collection of objects of the same data type. First, we define the list as an Abstract Data Type (ADT). So, we are only concerned with the data and operations on the list, not its implementation.
List as ADT
Let's take an example, we want to make a list that can perform the following operations.
- Store a given number of elements of any given data type.
- Read elements by their position in the list.
- Write/Modify elements at any position in a list.
All the above features are about data and operations on the list having a specific data type. So this is an abstract data type because we only focus on “what the list does” rather than the implementation in terms of “how the list does”.
Static List
The list you have seen above is some sort of static list because it is of some fixed size and will not grow automatically when the list is full. Now the question comes what is the implementation of this static list? We know this is the second concept about that data structure, which is its implementation. In other words, you can say you have to do the concrete implementation of this static list in which you can store elements, read elements, and modify elements. Let’s say we implement the above static list ADT as “arrays”.
What is Array?
The array is a sequential-linear data structure that provides us with the implementation of the list, so it means it is also a collection of objects of the same data type. Here, sequential means, the array is a block of one contiguous memory that starts from index 0 to a specific given index size. Let’s implement the array for the above ADT static list.



Hence, you have seen the implementation of the ADT as a static list. Because this list is a static list and now we want to make a list that has more features. So we have to redefine the list with new features. Let’s say, we want to make a list that has the following functionalities.
- An empty list should have a size of 0.
- Enable us to insert an element at any position.
- Enable us to remove elements from any position.
- Enable us to count the total number of elements in the list.
- Read/Modify the element at any particular position in the list.
- Specify the data type of the list.
Now, we need a data structure that implements the above ADT. Let’s say we are taking here the array (sequential-linear data structure) data structure. Let’s say we create an array of some large max size that implements the above ADT.
You can see in the following pictures that, first we create the int array A of some maximum size, then we make a variable named “end” and set it to -1 which is an invalid address showing that the list is empty. Then we insert the value into the list.








n, so time complexity in terms of Big-Oh notation will become O(n), which shows linear time complexity.
Mariusz PostolPosted Jul 16, 2024, 9:16 AM
What difference is between complex and structural data.
Mariusz PostolPosted Jul 16, 2024, 9:08 AM
More in context of structural data you cn get from my article at-: <https://www.c-sharpcorner.com/article/programming-in-practice-structural-data/>.
Rushi MehtaPosted Nov 19, 2018, 2:29 AM
Nice Article
Fadoua DestinPosted Nov 18, 2018, 5:09 AM
Nice Article.