<aside>
<img src="/icons/home_green.svg" alt="/icons/home_green.svg" width="40px" />
Back to Home
</aside>
https://jennychen9827sbu.github.io/CAD281/ADT.html
https://jennychen9827sbu.github.io/CAD281/stackQueueTimeComplexity.html
- An Abstract Data Type (ADT) defines what a data structure does — not how it is implemented.
- Comparison Function Modules vs ADT
What is an ADT (Abstract Data Type)?
An ADT is a logical model of a data structure that defines:
- What operations it can perform (e.g., push, pop for stack)
- Not how those operations are implemented
It's like using a TV remote: you press buttons (interface) but don’t care about the circuits inside (implementation).
Why use ADTs?
- Clean separation between logic and implementation
- Easier to modify or replace implementation later
- Encourages modular, reusable code
Where is ADT used?
- In your own code modules (stack, queue, list, etc.)
- In libraries (e.g.,
stdio.h hides how printf works)