Вы находитесь на странице: 1из 2

Abstract Data Types

 Variable
name ;
=5


 set of values that it may assume


. int a
 value eg
 Data type
 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:
Implementation:
 single-linked list
 arrays
 doubly-linked list
 records linked with pointers
 cursors

ADT: Stack
 Definition:  Operations
 A kind 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 integer index  Array
 A function 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:
 An array in which  List of Pairs
indexes may be of any  Vector of Pairs
type (domain type)  a hardware solution:
Associative Memory

Вам также может понравиться