SlideShare a Scribd company logo
Junaid khan
Visiting Lecturer University of
Peshawar
AND ITS TYPES
It is a logical way of storing data and it
also define mechanism of retrieve data.
What are Data Structures?



Data may be organized in many different ways.
A Data Structure is an arrangement of data in a
computer’s memory or on a disk.
 The logical or mathematical model of a particular
organization of a data is called Data Structures.
 The choice of a data model depends on two
consideration:
1) It must be rich enough in structure to mirror the actual
relationships of the data in the real world.
2) The structure should be simple enough that one can
effectively process the data when necessary.
Types of Data Structure
DATA
STRUCTURE

LINEAR

NON LINEAR
The data appearing in data structures are processed by means of
operations. The following are operations are major operations:
a) Traversing: Accessing each record exactly once so that
certain items in the record may be processed.
b) Searching: Finding the location of the record with a
given key value, or finding the locations of all records which satisfy
one or more conditions.
c) Inserting: Adding a new record to the structure.
d) Deleting: Removing a record from the structure.
Following two are special operations:
a) Sorting: Arranging the records in some logical order.
b) Merging: Combining the records in two different sorted
files into a single sorted file.
An algorithm is a well-defined list of steps for solving a particular
problem.
Algorithms manipulate the data present in data structures in various
ways, such as searching for a particular data item and sorting the data.
Flowcharts are pictorial representations of the algorithms.
Properties/ characteristics of the algorithm:
a) Finiteness: Total number of steps used in an algorithm
should be finite.
b) Definiteness: Each step of algorithm must be clear and
unambiguous.

c) Effectiveness: Every step must be basic and essential.
d) Input/output: The algorithm must accept zero or more
input and must produce at least on output.
1.Array
2.Stack
3.Queue
4.Linked List
An array is a collection of homogeneous
type of data elements.
An array is consisting of a collection of
elements .
1.Traversing
2.Search
3.Insertion
4.Deletion
5.Sorting
6.Merging
Representation of array in memory
1

2
3
4
5
Array Representation
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.
Push: add an element in stack
Pop: remove an element in stack
Representation of Stack
EEE

DDD
CCC
BBB
AAA

TOP
Stack Representation
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.
Insertion : add a new element in queue
Deletion: Removing an element in queue
Representation of Queue

55

65

75
Queue Representation
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
1.Traversing
2.Searching
3.Insertion
4.Deletion
Linked Representation
1.Tree
2.Graph
In computer science, a tree is a widely-used data
structure that emulates a hierarchical tree structure
with a set of linked nodes.
1.Insertion
2.Deletion
3.Searching
Tree Representation
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.).
1.Searching
2.Insertion
3.Deletion
Graph Representation
Data structure

More Related Content

PPTX
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
PPTX
Data structure and its types
PPT
Basic data-structures-v.1.1
PPTX
Data Structure
PDF
Data structures (introduction)
PPTX
Data structure and its types
PDF
Data structures Basics
PPT
Data structures
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure and its types
Basic data-structures-v.1.1
Data Structure
Data structures (introduction)
Data structure and its types
Data structures Basics
Data structures

What's hot (20)

PDF
Datastructure
PDF
Data structures
PPTX
Data structure & its types
DOC
Data structures project
PPT
Data structure lecture 1
PPTX
Introduction to data structure
PPTX
Bca ii dfs u-1 introduction to data structure
PPT
Data structures using c
PPTX
Data structure & algorithms introduction
PPT
Introductiont To Aray,Tree,Stack, Queue
PPT
Introduction of data structure
PPTX
Data structure and its types.
PPTX
Introduction to data structure
PPTX
Presentation on Data Structure
PDF
Data structure
PPTX
Introduction to data structure ppt
PDF
Introduction of data structures and algorithms
PDF
Introduction to data structure
PPT
data structure
Datastructure
Data structures
Data structure & its types
Data structures project
Data structure lecture 1
Introduction to data structure
Bca ii dfs u-1 introduction to data structure
Data structures using c
Data structure & algorithms introduction
Introductiont To Aray,Tree,Stack, Queue
Introduction of data structure
Data structure and its types.
Introduction to data structure
Presentation on Data Structure
Data structure
Introduction to data structure ppt
Introduction of data structures and algorithms
Introduction to data structure
data structure
Ad

Viewers also liked (8)

PPTX
Lecture 16 data structures and algorithms
PPTX
Tree in data structure
PPTX
PPT
Binary tree
PPTX
Tree in data structure
PPTX
Trees (data structure)
PDF
Tree and binary tree
PPTX
Trees data structure
Lecture 16 data structures and algorithms
Tree in data structure
Binary tree
Tree in data structure
Trees (data structure)
Tree and binary tree
Trees data structure
Ad

Similar to Data structure (20)

PPTX
Slide 1.-datastructure
PPTX
DS Module 1.pptx
PDF
Chapter 1 Introduction to Data Structures and Algorithms.pdf
PPSX
Data Structure # vpmp polytechnic
PPTX
EC2311 – Data Structures and C Programming
PPT
Unit i(dsc++)
PPTX
DS Module 1.pptx
PPTX
TSAT Presentation1.pptx
PPTX
Data Structures and algoithms Unit - 1.pptx
PPTX
Data_structures_and_algorithm_Lec_1.pptx
PPTX
Data_structures_and_algorithm_Lec_1.pptx
PPTX
01-Introduction of DSA-1.pptx
PPTX
CSE 443 (1).pptx
PDF
M v bramhananda reddy dsa complete notes
PPT
DATA STRUCTURE AND ALGORITHMS
PPTX
Introduction to data structures and its types
PPTX
1introduction-191021211508Algorithms and data structures.pptx
DOCX
Stacks
PPTX
DS Module1 (1).pptx
PDF
Data Structures & algorithms kdkdkakdkadkd
Slide 1.-datastructure
DS Module 1.pptx
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Data Structure # vpmp polytechnic
EC2311 – Data Structures and C Programming
Unit i(dsc++)
DS Module 1.pptx
TSAT Presentation1.pptx
Data Structures and algoithms Unit - 1.pptx
Data_structures_and_algorithm_Lec_1.pptx
Data_structures_and_algorithm_Lec_1.pptx
01-Introduction of DSA-1.pptx
CSE 443 (1).pptx
M v bramhananda reddy dsa complete notes
DATA STRUCTURE AND ALGORITHMS
Introduction to data structures and its types
1introduction-191021211508Algorithms and data structures.pptx
Stacks
DS Module1 (1).pptx
Data Structures & algorithms kdkdkakdkadkd

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPT
Teaching material agriculture food technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
cuic standard and advanced reporting.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Machine learning based COVID-19 study performance prediction
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Dropbox Q2 2025 Financial Results & Investor Presentation
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Understanding_Digital_Forensics_Presentation.pptx
Teaching material agriculture food technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
“AI and Expert System Decision Support & Business Intelligence Systems”
cuic standard and advanced reporting.pdf
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
Spectral efficient network and resource selection model in 5G networks
Network Security Unit 5.pdf for BCA BBA.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Machine learning based COVID-19 study performance prediction
CIFDAQ's Market Insight: SEC Turns Pro Crypto
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

Data structure

  • 1. Junaid khan Visiting Lecturer University of Peshawar
  • 3. It is a logical way of storing data and it also define mechanism of retrieve data.
  • 4. What are Data Structures?   Data may be organized in many different ways. A Data Structure is an arrangement of data in a computer’s memory or on a disk.  The logical or mathematical model of a particular organization of a data is called Data Structures.  The choice of a data model depends on two consideration: 1) It must be rich enough in structure to mirror the actual relationships of the data in the real world. 2) The structure should be simple enough that one can effectively process the data when necessary.
  • 5. Types of Data Structure DATA STRUCTURE LINEAR NON LINEAR
  • 6. The data appearing in data structures are processed by means of operations. The following are operations are major operations: a) Traversing: Accessing each record exactly once so that certain items in the record may be processed. b) Searching: Finding the location of the record with a given key value, or finding the locations of all records which satisfy one or more conditions. c) Inserting: Adding a new record to the structure. d) Deleting: Removing a record from the structure. Following two are special operations: a) Sorting: Arranging the records in some logical order. b) Merging: Combining the records in two different sorted files into a single sorted file.
  • 7. An algorithm is a well-defined list of steps for solving a particular problem. Algorithms manipulate the data present in data structures in various ways, such as searching for a particular data item and sorting the data. Flowcharts are pictorial representations of the algorithms. Properties/ characteristics of the algorithm: a) Finiteness: Total number of steps used in an algorithm should be finite. b) Definiteness: Each step of algorithm must be clear and unambiguous. c) Effectiveness: Every step must be basic and essential. d) Input/output: The algorithm must accept zero or more input and must produce at least on output.
  • 9. An array is a collection of homogeneous type of data elements. An array is consisting of a collection of elements .
  • 11. Representation of array in memory 1 2 3 4 5
  • 13. 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.
  • 14. Push: add an element in stack Pop: remove an element in stack
  • 17. 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.
  • 18. Insertion : add a new element in queue Deletion: Removing an element in queue
  • 21. 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
  • 25. In computer science, a tree is a widely-used data structure that emulates a hierarchical tree structure with a set of linked nodes.
  • 28. 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.).