KEMBAR78
Data Structure and Algorithms | PPTX
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

Data Structure and Algorithms

  • 1.
    INTRODUCTION TO DATA STRUCTUREAND ALGORITHMS Mrs.S.SUMATHI, Assistant Professor, Dept. of IT, EMG Yadava Women’s College, Madurai – 14. Sumathi.emg@gmail.com
  • 2.
    Outline  Introduction  Whatis 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? DictionaryDefinition: 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 BECOMESINFORMATION? DATA : INAM SI EMAN YM INFORMATION : MY NAME IS MANI THIS MEANINGFUL OR PROCESSED DATA IS CALLED INFORMATION
  • 6.
    What is datastructure?  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 forData 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 (Demonstrateusing 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
  • 11.
  • 12.
    Did You Know? StackData 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 Structureis used to store an image as a Bitmap? ARRAYS
  • 14.
    Bitmap is acollection of bytes that represent a Graphic image or a picture.
  • 15.
    Storing the friendshipinformation on a social networking site. Malathi Meera Mala Meena Guess: Which Data Structure is used to store this information?
  • 16.
  • 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 agood 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 isuseful in day to day life and are using them more frequently that is why it is so hot subject in Information Technology Industry.