Data Structure and Abstract Data Types
A data structure is a particular way of organizing data in a computer so that it can be used efficiently for programming operations.
The term data structures can be defined as a set of data items that collectively describe an object which can be manipulated by program.
Abstract Data Types:
An abstract data type(ADT) combines the description of data structure, and associated operations.
ADT has following characteristics:
1) It provides a description of element in term of data types
2) It defines relationship among individual elements.
3) valid operations and parameters to be passed.
4) error conditions associated with the operations.
An ADT stacks can be defined by packaging together the following operations.
-> push(): It is used for inserting an item in stack
->pop(): It is used for returning an item.
->peek(): It returns top most element from the stack.
-> size(): It tells the total number of elements in stack.
-> isempty(): It has two values , if it returns true that means stack is empty and if it returns false that means stack is not empty.
-> Set of operations and element of ADT Data Structure or manipulated through interface.
-> Implementation of operations and Data Items are hidden from the application program.