<<

Abstract Data Types

 Variable  name ; = 5  a of values that it may assume int g.  value e   set of values that a variable may assume  set of operations  Abstract Data Type  mathematical set of values (model of data)  set of operations

ADT: List

 Definition:  Operations  sequence of zero or  insert more elements of a  first, next, previous given type  null  Recursive definition:  find  a null or a pair of an  retrieve element and a list  delete  Subtypes: :  single-  arrays  doubly-linked list  records linked with pointers  cursors

ADT: Stack

 Definition:  Operations  A of list in which  push all insertions and  pop deletions occur at  null one end (the top)   a LIFO queue Implementation Last In First Out  array  records linked with pointers

1 ADT: Queue

 Definition:  Operations:  A kind of list in which  enqueue elements are  dequeue inserted at one and (the rear)and  Implementation: deleted at the other  records linked with pointers (the front)  circular array  a FIFO queue First In First Out

ADT: Vector or Array

 Definition:  Operations:  A sequence of  Assign (Set) elements of a given  Get type, in which  Implementation: each element is given by an index  Array   A from a Growable Array continuous subset of (Reallocable Array) integer type to the  List range type

ADT: Map or Associative Store

 Definition:  Operations:  A function from an  Assign (Set) element of a domain  Get type to  the range type Implementation:  List of Pairs  An array in which indexes may be of any  Vector of Pairs type (domain type)  a hardware solution: Associative Memory

2