#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
Data Structures Fundamentals

Abstract Data Type in Data Structure with Example

An Abstract Data Type (ADT) is a theoretical model that defines a set of operations and their behavior, without specifying how those operations are implemented internally. It separates what a data structure does from how it does it.

Why ADTs Matter

  • They provide a clear contract for using a data structure without needing to know its internal implementation.
  • They allow implementation details to change (e.g., array-based vs linked-list-based) without affecting code that uses the ADT.
  • They promote abstraction and modularity in software design.

Example: Stack ADT

The Stack ADT defines operations like push(item), pop(), peek(), and isEmpty(), along with the rule that elements are removed in LIFO order. It can be implemented using an array or a linked list — both are valid as long as they honor the ADT's contract.

Example: List ADT

The List ADT defines operations such as insert(index, item), remove(index), get(index), and size(). It can be implemented as a dynamic array or a linked list.

Common ADTs

ADTTypical Operations
Stackpush, pop, peek, isEmpty
Queueenqueue, dequeue, front, isEmpty
Listinsert, delete, get, size
Map/Dictionaryput, get, remove, containsKey

Key Takeaway

ADTs are a design-level concept, while data structures like arrays, linked lists, and trees are the concrete implementations used to realize those ADTs.

Ready to master Data Structures & Algorithms?

Learn DSA hands-on with mentor-led sessions, real interview practice, and placement support.

Explore Course