SlideShare a Scribd company logo
1 of 22
INTRODUCTION TO
DATA STRUCTURE AND
ALGORITHMS
Mrs.S.SUMATHI,
Assistant Professor, Dept. of IT,
EMG Yadava Women’s College, Madurai – 14.
Sumathi.emg@gmail.com
Outline
 Introduction
 What is Data?
 What is Data Structure?
 Types of Data Structure
 Need for Data Structure
 Data Structure Operations
 Real Life Examples
 What is Algorithm?
 What is Good Algorithm?
 A Simple Algorithm – Example
 Algorithm Development Basics
What is Data?
Dictionary Definition:
The Quantities, Characters or Symbols on which operations are
performed by a computer, which may be stored and transmitted in
the form of electrical signals and recorded on magnetic, optical or
mechanical recording media.
Example: c = a + b
MY DATA
Types of data
 Data
 A collection of facts from which conclusion may be drawn
 e.g. Data: Temperature 35°C; Conclusion: It is hot.
 Types of data
 Textual: For example, your name (Meenakshi)
 Numeric: For example, your ID (090254)
 Audio: For example, your voice
 Video: For example, your voice and picture
 (...)
WHEN DATA BECOMES INFORMATION?
DATA : INAM SI EMAN YM
INFORMATION : MY NAME IS MANI
THIS MEANINGFUL OR PROCESSED
DATA IS CALLED INFORMATION
What is data structure?
 A particular way of storing and organizing data in a computer so that it can be used
efficiently and effectively.
 Data structure is the systematic way to organize data so that it can be used
efficiently.
 Example : ARRAY
 A group of similar data elements grouped together under one name.
 For example, an array of integers and Storing Strings.
There are many, but we named a few. We’ll learn these
data structures in great detail!
Array
Linked List
Tree
Queue Stack
Types of data structures
The Need for Data Structures
 Goal: to organize data
 Criteria: to facilitate efficient
 storage of data
 retrieval of data
 manipulation of data
 Design Issue:
 select and design appropriate data types
(This is the main motivation to learn and understand data
structures)
Data Structure Operations
(Demonstrate using class room example!)
 Traversing
 Accessing each data element exactly once so that certain
items in the data may be processed
 Searching
 Finding the location of the data element (key) in the
structure
 Insertion
 Adding a new data element to the structure
Data Structure Operations (cont.)
 Deletion
 Removing a data element from the structure
 Sorting
 Arrange the data elements in a logical order
(ascending/descending)
 Merging
 Combining data elements from two or more data structures
into one
REAL LIFE EXAMPLES
Did You Know?
Stack Data Structure is used in implementing Redo and Undo Features.
UNDO STACK REDO STACK
A
B
C
C
Top
Ctrl + Z
Ctrl + Y
Which Data Structure is used to store an image
as a Bitmap?
ARRAYS
Bitmap is a collection of bytes that represent a Graphic image
or a picture.
Storing the friendship information on a social
networking site.
Malathi
Meera Mala
Meena
Guess: Which Data Structure is used to store this information?
GRAPHS
What is algorithm?
 A finite set of instructions which accomplish a particular
task
 A method or process to solve a problem
 Transforms input of a problem to output
Algorithm = Input + Process + Output
Algorithm development is an art – it needs practice,
practice and only practice!
What is a good algorithm?
 It must be correct
 It must be finite (in terms of time and size)
 It must terminate
 It must be unambiguous
 Which step is next?
 It must be space and time efficient
A program is an instance of an algorithm, written in
some specific programming language
A simple algorithm
 Problem: Find maximum of a, b, c
 Algorithm
 Input = a, b, c
 Output = max
 Process
o Let max = a
o If b > max then
max = b
o If c > max then
max = c
o Display max
 Output = max
Algorithm development: Basics
 Clearly identify:
 what output is required?
 what is the input?
 What steps are required to transform input into
output
o The most crucial bit
o Needs problem solving skills
o A problem can be solved in many different ways
o Which solution, amongst the different possible
solutions is optimal?
Conclusion
Data Structure is useful in day to day life and are using
them more frequently that is why it is so hot subject in
Information Technology Industry.
Data Structure and Algorithms

More Related Content

What's hot

What's hot (20)

Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]
 
Stack
StackStack
Stack
 
Binary search tree(bst)
Binary search tree(bst)Binary search tree(bst)
Binary search tree(bst)
 
Binary Search Tree in Data Structure
Binary Search Tree in Data StructureBinary Search Tree in Data Structure
Binary Search Tree in Data Structure
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
stack & queue
stack & queuestack & queue
stack & queue
 
Heap sort
Heap sortHeap sort
Heap sort
 
Query trees
Query treesQuery trees
Query trees
 
Linked List - Insertion & Deletion
Linked List - Insertion & DeletionLinked List - Insertion & Deletion
Linked List - Insertion & Deletion
 
Stacks in c++
Stacks in c++Stacks in c++
Stacks in c++
 
Stack and Queue
Stack and Queue Stack and Queue
Stack and Queue
 
Insertion in singly linked list
Insertion in singly linked listInsertion in singly linked list
Insertion in singly linked list
 
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 Data Structures - Lecture 9 [Stack & Queue using Linked List] Data Structures - Lecture 9 [Stack & Queue using Linked List]
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 
Stacks
StacksStacks
Stacks
 
Linear data structure concepts
Linear data structure conceptsLinear data structure concepts
Linear data structure concepts
 
Bfs and Dfs
Bfs and DfsBfs and Dfs
Bfs and Dfs
 
NUMPY
NUMPY NUMPY
NUMPY
 
Abstract Data Types
Abstract Data TypesAbstract Data Types
Abstract Data Types
 
Evaluation of postfix expression
Evaluation of postfix expressionEvaluation of postfix expression
Evaluation of postfix expression
 

Similar to Data Structure and Algorithms

Bca2020 data structure and algorithm
Bca2020   data structure and algorithmBca2020   data structure and algorithm
Bca2020 data structure and algorithm
smumbahelp
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
Qundeel
 

Similar to Data Structure and Algorithms (20)

EE-232-LEC-01 Data_structures.pptx
EE-232-LEC-01 Data_structures.pptxEE-232-LEC-01 Data_structures.pptx
EE-232-LEC-01 Data_structures.pptx
 
Intro to DS.pptx
Intro to DS.pptxIntro to DS.pptx
Intro to DS.pptx
 
Intro to DSAA.ppt
Intro to DSAA.pptIntro to DSAA.ppt
Intro to DSAA.ppt
 
Introduction to Data Structure.pptx
Introduction to Data Structure.pptxIntroduction to Data Structure.pptx
Introduction to Data Structure.pptx
 
lec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.pptlec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.ppt
 
lec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.pptlec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.ppt
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and review
 
Lec1
Lec1Lec1
Lec1
 
Lec1
Lec1Lec1
Lec1
 
Bca2020 data structure and algorithm
Bca2020   data structure and algorithmBca2020   data structure and algorithm
Bca2020 data structure and algorithm
 
Lecture 1 and 2
Lecture 1 and 2Lecture 1 and 2
Lecture 1 and 2
 
8.unit-1-fds-2022-23.pptx
8.unit-1-fds-2022-23.pptx8.unit-1-fds-2022-23.pptx
8.unit-1-fds-2022-23.pptx
 
Mca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureMca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structure
 
Slide1
Slide1Slide1
Slide1
 
1- Introduction.pptx.pdf
1- Introduction.pptx.pdf1- Introduction.pptx.pdf
1- Introduction.pptx.pdf
 
algo 1.ppt
algo 1.pptalgo 1.ppt
algo 1.ppt
 
Bsc cs ii dfs u-1 introduction to data structure
Bsc cs ii dfs u-1 introduction to data structureBsc cs ii dfs u-1 introduction to data structure
Bsc cs ii dfs u-1 introduction to data structure
 
Data structures & problem solving unit 1 ppt
Data structures & problem solving unit 1 pptData structures & problem solving unit 1 ppt
Data structures & problem solving unit 1 ppt
 
Bca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structureBca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structure
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 

Data Structure and Algorithms

  • 1. INTRODUCTION TO DATA STRUCTURE AND ALGORITHMS Mrs.S.SUMATHI, Assistant Professor, Dept. of IT, EMG Yadava Women’s College, Madurai – 14. Sumathi.emg@gmail.com
  • 2. Outline  Introduction  What is Data?  What is Data Structure?  Types of Data Structure  Need for Data Structure  Data Structure Operations  Real Life Examples  What is Algorithm?  What is Good Algorithm?  A Simple Algorithm – Example  Algorithm Development Basics
  • 3. What is Data? Dictionary Definition: The Quantities, Characters or Symbols on which operations are performed by a computer, which may be stored and transmitted in the form of electrical signals and recorded on magnetic, optical or mechanical recording media. Example: c = a + b MY DATA
  • 4. Types of data  Data  A collection of facts from which conclusion may be drawn  e.g. Data: Temperature 35°C; Conclusion: It is hot.  Types of data  Textual: For example, your name (Meenakshi)  Numeric: For example, your ID (090254)  Audio: For example, your voice  Video: For example, your voice and picture  (...)
  • 5. WHEN DATA BECOMES INFORMATION? DATA : INAM SI EMAN YM INFORMATION : MY NAME IS MANI THIS MEANINGFUL OR PROCESSED DATA IS CALLED INFORMATION
  • 6. What is data structure?  A particular way of storing and organizing data in a computer so that it can be used efficiently and effectively.  Data structure is the systematic way to organize data so that it can be used efficiently.  Example : ARRAY  A group of similar data elements grouped together under one name.  For example, an array of integers and Storing Strings.
  • 7. There are many, but we named a few. We’ll learn these data structures in great detail! Array Linked List Tree Queue Stack Types of data structures
  • 8. The Need for Data Structures  Goal: to organize data  Criteria: to facilitate efficient  storage of data  retrieval of data  manipulation of data  Design Issue:  select and design appropriate data types (This is the main motivation to learn and understand data structures)
  • 9. Data Structure Operations (Demonstrate using class room example!)  Traversing  Accessing each data element exactly once so that certain items in the data may be processed  Searching  Finding the location of the data element (key) in the structure  Insertion  Adding a new data element to the structure
  • 10. Data Structure Operations (cont.)  Deletion  Removing a data element from the structure  Sorting  Arrange the data elements in a logical order (ascending/descending)  Merging  Combining data elements from two or more data structures into one
  • 12. Did You Know? Stack Data Structure is used in implementing Redo and Undo Features. UNDO STACK REDO STACK A B C C Top Ctrl + Z Ctrl + Y
  • 13. Which Data Structure is used to store an image as a Bitmap? ARRAYS
  • 14. Bitmap is a collection of bytes that represent a Graphic image or a picture.
  • 15. Storing the friendship information on a social networking site. Malathi Meera Mala Meena Guess: Which Data Structure is used to store this information?
  • 17. What is algorithm?  A finite set of instructions which accomplish a particular task  A method or process to solve a problem  Transforms input of a problem to output Algorithm = Input + Process + Output Algorithm development is an art – it needs practice, practice and only practice!
  • 18. What is a good algorithm?  It must be correct  It must be finite (in terms of time and size)  It must terminate  It must be unambiguous  Which step is next?  It must be space and time efficient A program is an instance of an algorithm, written in some specific programming language
  • 19. A simple algorithm  Problem: Find maximum of a, b, c  Algorithm  Input = a, b, c  Output = max  Process o Let max = a o If b > max then max = b o If c > max then max = c o Display max  Output = max
  • 20. Algorithm development: Basics  Clearly identify:  what output is required?  what is the input?  What steps are required to transform input into output o The most crucial bit o Needs problem solving skills o A problem can be solved in many different ways o Which solution, amongst the different possible solutions is optimal?
  • 21. Conclusion Data Structure is useful in day to day life and are using them more frequently that is why it is so hot subject in Information Technology Industry.