what is adt in data structure

11 months ago 17
Nature

An Abstract Data Type (ADT) is a mathematical model for data types, defined by its behavior from the point of view of a user of the data, specifically in terms of possible values and possible operations on data of this type. ADTs are a way of encapsulating data and operations on that data into a single unit, providing a better conceptualization of the data structure and allowing for reusability of code. The definition of an ADT only mentions what operations are to be performed but not how these operations will be implemented. It does not specify how data will be organized in memory and what algorithms will be used for implementing the operations. It is called “abstract” because it gives an implementation-independent view.

ADTs are a theoretical concept used in the design and analysis of algorithms, data structures, and software systems, and do not correspond to specific features of computer languages. However, various language features correspond to certain aspects of ADTs, and are easily confused with ADTs proper; these include abstract types, opaque data types, protocols, and design by contract.

Some key features of ADTs include:

  • Abstraction: The user does not need to know the implementation of the data structure, only essentials are provided.
  • Better Conceptualization: ADT gives us a better conceptualization of the data structure.

Examples of ADTs include list, stack, queue, etc. .