Introduction To Data Structure 073310
Introduction To Data Structure 073310
DATA
STRUCTURE
WHAT IS A DATA
STRUCTURE?
2
2 TYPES OF DATA
STRUCTURE
1. Linear data structure - Data structure in which
data elements are arranged sequentially or linearly,
where each element is attached to its previous and
next adjacent elements, is called a linear data
structure.
2. Non-linear data structure - Data structures where
data elements are not placed sequentially or linearly
are called non-linear data structures. In a non-linear
data structure, we can’t traverse all the elements in
a single run only. Examples of non-linear data
structures are trees and graphs.
EXAMPLES OF
LINEAR DATA
STRUCTURE
1. Array
2. Stack
3. Queue
4. Linked List
ARRAY DATA
STRUCTURE
In an array, elements in memory are arranged in continuous
memory. All the elements of an array are of the same type.
And, the type of elements that can be stored in the form of
arrays is determined by the programming language.
5
STACK DATA STRUCTURE
In stack data structure, elements are stored in the LIFO
principle. That is, the last element stored in a stack will
be removed first.
6
QUEUE DATA STRUCTURE
Unlike stack, the queue data structure works in the
FIFO principle where first element stored in the queue
will be removed first.
7
LINKED LIST DATA
STRUCTURE
In linked list data structure, data elements are connected
through a series of nodes. And, each node contains the data
items and address to the next node.
8
EXAMPLES OF NON-LINEAR
DATA STRUCTURE
1. Graph
2. Trees
9
GRAPH DATA
STRUCTURE
In graph data structure, each node is called vertex
and each vertex is connected to other vertices
through edges.
TREES DATA
STRUCTURE
Similar to a graph, a tree is also a collection of
vertices and edges. However, in tree data structure,
there can only be one edge between two vertices.
REFERENCES:
https://www.programiz.com/dsa/data-structur
e-types
https://www.geeksforgeeks.org/introduction-to
-data-structures/