The Structural Organization of data is called as a Data
Structure. Or Data Structure is a collection of organized data that are
related to each other. Data Structures can be classified in two ways
1. Linear Data Structure(array, stack, queue, ect..).
2. Non-Linear Data Structure(graphs, Trees).
Linear Data Structure
• The Representation of Data In a linear Order In the data structure is
called as linear data structure.
• Arrays are the best example for linear data structure because in array
all the elements are homogeneous and linear.
• 10,20….80 are called as elements of the array
• The array index is starts from 0 and ends with n-1
10 20 30 40 50 60 70 80
• A stack is a linear data structure
• In a stack all the elements insert and delete from only one end that
is called as top of the stack.
• A stack follows LIFO(Last In First Out) mechanism.
• The stack data structure is mostly used in system softwares.
• Data insert into stack using push() operation
• Data delete from stack using pop() operation
• A Queue is a linear data structure.
• The queue having two ends one is front end and rare end.
• The front end is used to insert the data into queue.
• The rare end is used to delete the data from queue.
• The queue follows FIFO(First In First Out) Mechanism.
• Data insert into queue using push() operation.
• Data delete from queue using pop() operation.
10 20 30 40 50 60
• Linked List is a linear Data structure.
• Linked List contains List of nodes. Each node contains two parts
1. Data Part
2. Address of Next Node (Link to next node in the list)
• The nodes in the linked list represents in terms of structures.
Jaggu 101 Phalguna 102 lokesh
-Non Linear Data Structure
• The data structure which is used to store the data in non-linear order is
called as non-linear data structure.
• Trees and Graphs are the most popular non-linear data structures.
• In trees, It has one root node and Two child nodes. Each root node
having two child nodes those, left child and right child nodes.
• A graph is a set of nodes and set of edges.
• The edges are formed when the nodes are non-linearly connected among
• A Tree is a non-linear data structure.
• Each Tree can have one root node and two child nodes. Left child and
• The ending elements of the tree is called as terminal nodes.
• Terminal nodes are don’t have any child node.
• Accessing of a tree elements is called tree traversing.
• Each sub-tree of a tree itself is a tree.
• The number of vertical positions in the tree is called height of the tree.
DD EE FF GG
• A Graph is a non-linear Data structure.
• A graph is a set of nodes and edges. The edge is formed when two
nodes are connected among them.
• A Graph is connected Graph when the path existed between any two
nodes in the graph. In connected graph each node can have two
paths (incoming, outgoing).
• A Graph is non-connected Graph when a node can have only one
path then graph is called as non-connected graph.