types data structures( linear and non linear)
TRANSCRIPT
![Page 1: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/1.jpg)
Presentation
On
TYPES OF DATA STRUCTURES
Sub:
DATA
STRUCTURES
3nd Sem Computer
(2015-16)
Prepared By:
Name: Shail M Nakum
Enr No: 150410107054
Class: S.Y.: Computer
Div.-I
![Page 2: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/2.jpg)
Data
Structure
It is a logical way of
storing data and it also
define mechanism of
retrieve data.
![Page 3: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/3.jpg)
Types of
Data Structure
DATA
STRUCTURE
NON LINEARLINEAR 38/1/2016
SHAIL M. NAKUM (150410107054)
![Page 4: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/4.jpg)
8/1/2016SHAIL M. NAKUM (150410107054) 4
Difference between
Linear and Nonlinear
Data Structures
![Page 5: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/5.jpg)
8/1/2016SHAIL M. NAKUM (150410107054) 5
• Main difference between linear and nonlinear
data structures lie in the way they organize
data elements.
• In linear data structures, data elements are
organized sequentially and therefore they are
easy to implement in the computer’s memory.
• In nonlinear data structures, a data element
can be attached to several other data elements
to represent specific relationships that exist
among them.
![Page 6: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/6.jpg)
8/1/2016SHAIL M. NAKUM (150410107054) 6
• Due to this nonlinear structure, they might be
difficult to be implemented in computer’s
linear memory compared to implementing
linear data structures.
• Selecting one data structure type over the
other should be done carefully by considering
the relationship among the data elements that
needs to be stored.
![Page 7: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/7.jpg)
Linear
Data Structure
1.Array
2.Stack
3.Queue
4.Linked List
78/1/2016SHAIL M. NAKUM (150410107054)
![Page 8: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/8.jpg)
1.Array
• An array is a collection of
homogeneous type of data
elements.
• An array is consisting of a
collection of elements .88/1/2016SHAIL M. NAKUM (150410107054)
![Page 9: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/9.jpg)
Array
Representation
98/1/2016SHAIL M. NAKUM (150410107054)
![Page 10: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/10.jpg)
2.Stack
A Stack is a list of elements in
which an element may be inserted or
deleted at one end which is known
as TOP of the stack.
108/1/2016SHAIL M. NAKUM (150410107054)
![Page 11: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/11.jpg)
Operation Performed
of Stack
Push: add an element
in stack
Pop: remove an
element in stack 118/1/2016SHAIL M. NAKUM (150410107054)
![Page 12: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/12.jpg)
Stack Representation
128/1/2016SHAIL M. NAKUM (150410107054)
![Page 13: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/13.jpg)
3.Queue
A queue is a linear list of element in
which insertion can be done at one end
which is known as front and deletion
can be done which is known as rear.
138/1/2016SHAIL M. NAKUM (150410107054)
![Page 14: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/14.jpg)
Representation of
Queue
55 65 75
148/1/2016SHAIL M. NAKUM (150410107054)
![Page 15: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/15.jpg)
4.Linked List
A Linked list is a linear collection of data
elements .It has two part one is info and
other is link part.info part gives
information and link part is address of
next node
158/1/2016SHAIL M. NAKUM (150410107054)
![Page 16: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/16.jpg)
Linked
Representation
168/1/2016SHAIL M. NAKUM (150410107054)
![Page 17: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/17.jpg)
2.Non Linear
1.Tree
2.Graph
178/1/2016SHAIL M. NAKUM (150410107054)
![Page 18: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/18.jpg)
1.Tree
In computer science, a tree is a
widely-used data structure that
emulates a hierarchical tree
structure with a set of linked nodes.
188/1/2016SHAIL M. NAKUM (150410107054)
![Page 19: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/19.jpg)
Tree Representation
198/1/2016SHAIL M. NAKUM (150410107054)
![Page 20: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/20.jpg)
2.Graph
A graph data structure may also
associate to each edge some edge value,
such as a symbolic label or a numeric
attribute (cost, capacity, length, etc.).
208/1/2016SHAIL M. NAKUM (150410107054)
![Page 21: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/21.jpg)
Graph
Representation
218/1/2016SHAIL M. NAKUM (150410107054)
![Page 22: TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)](https://reader034.vdocuments.site/reader034/viewer/2022050613/5885fede1a28ab0a3f8b51a5/html5/thumbnails/22.jpg)
228/1/2016SHAIL M. NAKUM (150410107054)