logo CBCE Skill INDIA

Welcome to CBCE Skill INDIA. An ISO 9001:2015 Certified Autonomous Body | Best Quality Computer and Skills Training Provider Organization. Established Under Indian Trust Act 1882, Govt. of India. Identity No. - IV-190200628, and registered under NITI Aayog Govt. of India. Identity No. - WB/2023/0344555. Also registered under Ministry of Micro, Small & Medium Enterprises - MSME (Govt. of India). Registration Number - UDYAM-WB-06-0031863

What is ADT and its types?


ADT & its Types
 

An Abstract Data Type (ADT) is a high-level, mathematical model that defines a set of values and a set of operations on those values without specifying how the data and operations are implemented. ADTs allow programmers to work with data structures in a way that abstracts away the underlying details, making it easier to understand and use data structures in software development.

 

There are several common types of Abstract Data Types, each tailored to specific use cases:

 

  1. Stack:

    • A stack is a linear data structure that follows the Last-In, First-Out (LIFO) principle. The last item added to the stack is the first one to be removed.
    • Operations: Push (add an item to the top) and Pop (remove the top item).
  2. Queue:

    • A queue is a linear data structure that follows the First-In, First-Out (FIFO) principle. The first item added to the queue is the first one to be removed.
    • Operations: Enqueue (add an item to the rear) and Dequeue (remove the front item).
  3. List:

    • A list is a collection of elements, often with varying data types. Lists can be dynamic (size can change) or static (fixed size).
    • Operations: Insert, Delete, Search, Update, and Traversal.
  4. Set:

    • A set is a collection of distinct elements with no specific order.
    • Operations: Insert, Delete, Membership (check if an element is in the set), and Intersection/Union (combine sets).
  5. Map or Dictionary:

    • A map or dictionary associates keys with values, allowing you to store and retrieve data with a unique key.
    • Operations: Insert, Delete, Search (by key), and Update.
  6. Graph:

    • A graph is a collection of nodes (vertices) connected by edges. Graphs can be used to represent relationships between various entities.
    • Operations: Graph traversal (e.g., depth-first or breadth-first search) and various algorithms for analyzing graphs.
  7. Tree:

    • A tree is a hierarchical data structure that consists of nodes connected by edges. Trees are often used for tasks like organizing data, searching, and sorting.
    • Types of trees include binary trees, binary search trees, AVL trees, and more.
  8. Heap:

    • A heap is a specialized tree-based data structure that satisfies the heap property. Heaps are often used to implement priority queues and sorting algorithms.
    • Operations: Insert (often called "heapify"), Extract-Min/Max (remove and return the smallest/largest element), and more.
  9. Hash Table:

    • A hash table is a data structure that uses a hash function to map keys to values. It is efficient for fast lookups.
    • Operations: Insert, Delete, and Search (by key).

 

These are some of the fundamental ADTs used in programming. Depending on the programming language and the specific problem you're solving, you may find other ADTs or data structures that are not listed here. The choice of ADT depends on the specific requirements of your application and the efficiency characteristics of the data structure for the given use case.

 

Thank you.


Give us your feedback!

Your email address will not be published. Required fields are marked *
0 Comments Write Comment