Page 7 - Data Struct
P. 7
7
Algorithm and Data Structure
Types of Data Structure
Primitive : The integers, reals, logical data, character data, pointers
and reference are primitive data structures.
These data types are available in most programming languages as
built in type. Data objects of primitive data types can be operated upon
by machine level instructions
Non- Primitive : These data structure are derived from primitive data
structures. A set of homogeneous and heterogeneous data elements
are stored together.
Examples of non-primitives data structures: Array, structure, union,
linked-list, stack, queue, tree, graph
Linear : Elements are arranged in a linear fashion (one dimension).
All one-one relation can be handled through linear data structures.
Lists, stacks and queues are examples of linear data structure
Non-Linear : All one-many, many-many or many-many relations are
handled through non-linear data structures. Every data element can
have a number of predecessors as well as successors. Tree graphs and
table are examples of non-linear data structures
Static : In case of static data structure, memory for objects is allocated
at the time of loading of the program. Amount of memory required is
determined by the compiler during compilation
Dynamic : In case of dynamic data structure, the memory space
required by variables is calculated and allocated during execution

