Skip to main content

ADT versus data structure

Short answer

ADT is a logical model specifying what is stored and what operations are allowed, independent of implementation. Data structure is a concrete implementation detailing how data is stored (array, linked list) and how operations are coded. One ADT may be implemented by multiple data structures.

Differentiate between ADT and Data Structure.

Abstract data type (ADT)Data structure
Logical/mathematical model: what is stored and what operations existConcrete implementation: how the data is stored and operated on
Independent of any programming languageWritten in a particular language (e.g., C)
Defined by value and operator definitions (specification)Defined by memory layout and code (arrays, pointers, structs)
Hides implementation details from the userExposes details; the programmer manages them
Example: STACK with push, pop, emptyArray-based or linked-list-based stack
One ADT can have many data structuresA data structure implements one or more ADTs

✓ Answer checked by Claude Opus 5.5 (high effort)

All Data Structure and Algorithm chapter 1 questions →