ADT vs DSA Flashcards
What is an Abstract Data Type (ADT)?
A logical description of how data is organized and what operations are supported without concern for implementation.
What is a Data Structure (DSA)?
A concrete implementation of an ADT in a programming language.
How is an ADT different from a DSA?
An ADT defines behavior and interface; a DSA defines how that behavior is implemented using code and memory.
Is “Stack” an ADT or DSA?
ADT – it defines push/pop operations but doesn’t specify implementation.
What are some common implementations of a Stack?
Arrays, linked lists.
Is “Linked List” an ADT or DSA?
DSA – it’s a specific way to organize data in memory.
What are examples of ADTs?
Stack, Queue, List, Set, Map, Tree, Graph.
What are examples of DSAs?
Arrays, Linked Lists, Hash Tables, Heaps, Trees, Graph representations (Adjacency List/Matrix).
Can one ADT be implemented using multiple DSAs?
Yes – for example a Queue ADT can be implemented with an array or linked list.
Why are ADTs important in software design?
They allow abstraction – programmers can use data types without knowing their implementation.
Which layer of software development is concerned with ADTs?
The design or interface layer.
Which layer is concerned with DSAs?
The implementation layer – how the data is stored and manipulated in memory.
What is the benefit of separating ADT from DSA?
It promotes modularity, reusability, and easier maintenance.
Is a HashMap an ADT or a DSA?
It can be seen as an ADT (Map) implemented with a DSA like a hash table.