Abstract Data Types : All You Need To Know

Pretam Ray
2 min readOct 26, 2019

--

In computer science, an abstract data type (ADT) is a mathematical model for data types, where a data type is defined by its behavior (semantics) from the point of view of a user of the data, specifically in terms of possible values, possible operations on data of this type, and the behavior of these operations. This contrasts with data structures, which are concrete representations of data, and are the point of view of an implementer, not a user.

That’s the Wikipedia definition of an abstract data type(ADT) for you. But on reading for the first time you will not be able to get the hang out of it right away,so starting from the foundations of Computer Science we need to first understand what Data Structure is?

What is a Data Structure?

Basically, a data structure is a way of storing and organizing data so it can be used effectively.They are essential ingredients in creating fast and effective algorithms.

Data structures can be difference between an OK product and an OUTSTANDING one.

Now we are ready to begin with ADTs.

Abstract Data Type(ADT)

workflow of an ADT

An abstract data type(ADT) is an abstraction of a data structure which provides only the interface to which a data structure must adhere to.The interface does not provide any specific details about how things are getting implemented.It will be more clear if we see some examples.

Following are the ADTs and their data structures used:

  1. List : Linked List and Array.
  2. Queue : Linked List,Array and Stack.
  3. Set : TreeHashMap and Trie.
  4. Vehicle(A real life object) : Golf Cart,Bicycle,Sports Car , etc.

References:

[1] Introduction to Algorithms

[2] GeeksforGeeks

--

--

Pretam Ray

I am a computer science undergrad, studying about algorithms and implementing them in real life is my passion.