Classification of Data Structure -Linear and Non Linear
818 views
11 slides
May 02, 2024
Slide 1 of 11
1
2
3
4
5
6
7
8
9
10
11
About This Presentation
Classification of Data Structure
Size: 803.32 KB
Language: en
Added: May 02, 2024
Slides: 11 pages
Slide Content
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 Department:- Computer Technology Class:- CM3I Name of Subject:- Data Structures Using 'C‘ MSBTE Subject Code:- 22317 Name of Faculty: Prof. Vaibhav A. Parjane 1
Topic to be Covered Classification of Data Structure 2 Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
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
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
Classification of Data structure 1) Primitive Data structure : These are basic structures and directly operated upon by the machine instructions. A primitive data types defines how the data will be internally represented stored and retrieve from the memory. Eg : int , float, char, double. 2) Non- Primitive Data structure [ Derived] : These are derived from the primitive data structures. 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
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 Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
Linear Data Structures: 8 Array Linked List Queue Stack Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
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
Non Linear Data Structures: TREE GRAPH 10 Sanjivani K. B. P. Polytechnic Kopargaon Department of Computer Technology Prof. Vaibhav A. Parjane
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