Classification of Data Structure -Linear and Non Linear
1. SANJIVANI K. B. P. POLYTECHNIC,
KOPARGAON
With NBA ACCREDIATED programs , Approved by AICTE, New Delhi,
Recognized by Govt. of Maharashtra, Affiliated to Maharashtra State Board of
Technical Education, Mumbai, ISO 9001:2015 Certified Institute
Name of Faculty: Prof. Vaibhav A. Parjane
1
2. Topic to be Covered
Classification of Data Structure
2
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
3. Classification of Data structure
The data structure are normally divided into two
categories—
Primitive Data structure
Non- Primitive Data structure [ Derived]
Data Structure further classified into two categories :
Linear Data Structure
Non Linear Data Structure
3
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
4. Classification of Data Structure
Data Structure
Primitive Non – Primitive [Derived]
Array Lists Structure Files
Linear Non - Linear
Stack Queue Tree Graph
Integer
Char
Float
Pointer
4
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
5. Classification of Data structure
1) Primitive Data structure :
1. These are basic structures and directly operated upon by the
machine instructions.
2. A primitive data types defines how the data will be internally
represented stored and retrieve from the memory.
3. Eg: int, float, char, double.
2) Non- Primitive Data structure [ Derived] :
1. These are derived from the primitive data structures.
2. Eg: Array , Structure, Union, Pointer, User defined data types, linked-
list, stack, queue, tree, graph.
5
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
6. Linear Data Structures:
The data structure where data items are organized
sequentially or linearly where data elements attached one
after another is called linear data structure.
Data elements in a liner data structure are traversed one
after the other and only one element can be directly reached
while traversing.
All the data items in linear data structure can be traversed in
single run.
These kind of data structures are very easy to implement
because memory of computer is also organized in linear
fashion.
Examples of linear data structures
are Arrays, Stack, Queue and Linked List.
6
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
7. 7
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
8. Linear Data Structures:
8
Array
Linked List
Queue
Stack
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
9. Non Linear Data Structures:
The data structure where data items are not organized
sequentially is called non linear data structure.
In other words, A data elements of the non linear data
structure could be connected to more than one elements
to reflect a special relationship among them.
All the data elements in non linear data structure can
not be traversed in single run.
Examples of non linear data structures
are Trees and Graphs.
9
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
10. Non Linear Data Structures:
TREE GRAPH
10
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
11. Difference Between Linear and Non Linear Data Structure
Linear Data Structure Non-Linear Data Structure
Every item is related to its previous
and next item.
Every item is attached with many other
items.
Data is arranged in linear sequence. Data is not arranged in sequence.
Data items can be traversed in a single
run.
Data can not be traversed in a single
run.
Examples: Array, Stack, Queue, Linked
List.
Examples: Tree, Graph.
Implementation is Easy. Implementation is Difficult.
11
Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane