0
14kviews
Define ADT with an example
1 Answer
3
1.3kviews
  1. Abstract Data type (ADT) is a type (or class) for objects whose behavior is defined by a set of value and a set of operations
  2. The definition of ADT only mentions what operations are to be performed but not how these operations will be implemented
  3. It does not specify how data will be organized in memory.
  4. Also it does not specify what algorithms will be used for
  5. ADT provides only the essentials information to the user and hides the details of its implementation and hence it is called abstract.
  6. Examples of ADT

    1. Stack ADT:- A Stack contains elements of same type arranged in sequential order. All operations takes place at a single end that is top of the stack

    enter image description here

    2. Queue ADT:- A Queue contains elements of same type arranged in sequential order. Operations takes place at both ends, insertion is done at end and deletion is done at front.

    enter image description here.

Please log in to add an answer.