Data Structures Using C Pcnm
By
Jagadeesh, MCA
jagadeesh.aitam@gmail.com
Introduction
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
those are
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
Stack
• 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
10
20
30
40
50
60
70
80
Push() Pop()
Queue
• 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
Push() Pop()
Linked List
• 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
101 102100
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
them.
Trees
• A Tree is a non-linear data structure.
• Each Tree can have one root node and two child nodes. Left child and
right child.
• 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.
A
B C
D E F G
Graphs
• 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.
A B
CD
Connected
Graph
A B
CD
Non-Connected
Graph
Thank You
By
Jagadeesh, MCA

1.introduction to data_structures

  • 1.
    Data Structures UsingC Pcnm By Jagadeesh, MCA jagadeesh.aitam@gmail.com
  • 2.
    Introduction The Structural Organizationof 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 those are 1. Linear Data Structure(array, stack, queue, ect..). 2. Non-Linear Data Structure(graphs, Trees).
  • 3.
    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
  • 4.
    Stack • A stackis 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 10 20 30 40 50 60 70 80 Push() Pop()
  • 5.
    Queue • A Queueis 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 Push() Pop()
  • 6.
    Linked List • LinkedList 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 101 102100
  • 7.
    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 them.
  • 8.
    Trees • A Treeis a non-linear data structure. • Each Tree can have one root node and two child nodes. Left child and right child. • 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. A B C D E F G
  • 9.
    Graphs • A Graphis 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. A B CD Connected Graph A B CD Non-Connected Graph
  • 10.