Concrete Data Type (CDT) V/S Abstract Data Type (ADT)
Published by: Anil K. Panta
When learning about data structures, it’s important to know the difference between Abstract Data Types (ADT) and Concrete Data Types (CDT).Both are used to manage and organize data, but they are quite different in how they work and what they focus on.
What is an Abstract Data Type (ADT)?
An Abstract Data Type is a concept or blueprint that tells us what operations we can do on the data, without worrying about how those operations are done.
Key Points:
Focuses on what a data structure does
Hides internal details
Makes programming easier and more flexible
Example:
Stack (you can push or pop data, but you don’t care how it's done internally)
Queue, List, Tree, Graph
What is a Concrete Data Type (CDT)?
A Concrete Data Type is the actual implementation of the data in memory. It tells us how the data is stored and how theoperations are performed.
Key Points:
Focuses on how data is stored and manipulated
Shows actual implementation
Directly uses memory
Example:
Array (fixed-size, stored in memory)
Linked List, Struct, Class in code
Comparison Table: Abstract Data Type vs Concrete Data Type
Final Summary
Abstract Data Types (ADTs) are like the idea or plan of how data works, while Concrete Data Types (CDTs) are the actual building blocks that turn the idea into reality.