Data Structure And Algorithm
Prf. Purvi Prajapati
Department Of Information Technology
CSPIT, CHARUSAT
Outline
 Introduction
 Algorithm
 Data & Information
 Data Structure
 Data Type
 Types of Data Type
 Importance of Data Structure
 Types of Data Structure
Introduction
 Algorithm:
 a set of instructions for solving a problem in
a finite number of steps.
[From : https://www.dictionary.com]
 Step-by-step procedures required to solve a problem.
For example, to find the largest number in a list of
positive numbers.
Algorithm
Al Khawarizmi
 A great Iranian mathematician,
geographer and astronomer. He
introduced the zero, negative
numbers, algebra and the
decimal system. He also
invented mathematical
programming using a set of
instructions to perform
complex calculations.
 The term algorithm is named
after a variation of his name,
Algorithmi.
Algorithm
Algorithm is a step-by-step finite sequence of
instruction, to solve a well defined computational
problem for the given Input and expected Output.
Data & Information
 Data means value or a set of values.
 35
 21/12/2016,
 “CHARUSAT”
 12, 18, 24, 32
 Information means meaningful or processed data.
 35 Age of a person
 21/12/2016 Date of Birth
 “CHARUSAT” Name of the University
 12, 18, 14, 30 Marks of a subject
DATA
Procedure to
process data
Info-1
Info-2
Info-3
.
.
.
Info-n
Data Structure
 Data: Data is set of items
 Structure: How to organize data (A particular way of
organizing data in computer)
 A data structure is a method for organizing and
storing data, which would allow efficient data
retrieval and usage.
Data Structure
“I will, in fact, claim that the difference between a
bad programmer and a good one is whether he
considers his code or his data structures more
important. Bad programmers worry about the
code. Good programmers worry about data
structures and their relationships. ”
- Linus Torvalds (creator of Linux)
Algorithm + Data Structure = Program
-By Niklaus Wirth
 Program:
An implementation of
an algorithm in some
programming language
Data Type
 Data type is a term which refers to the kind of
data. That may appear in computation.
 35 Numeric (integer)
 21/12/2016 Date
 “CHARUSAT” String
 12, 18, 14, 30 Array of integers
Types of Data Type
Data Type
Built-in Data Type
(BDT)
Abstract / User-defined
DataType(ADT / UDT)
int
char
float
double
struct
union
class
Primitive
Non-
Primitive
Importance of Data Structure
 In computer, manipulation of primitive data
does not require any extra effort on the part of
user.
 In real-life applications, various kinds of data
other than primitive data are involved. So,
manipulation of real-life data requires following
tasks:
1. Storage representation of data
2. Retrieval of stored data
3. Transformation of data
Importance of Data Structure
 Data Structure is used for
 How the data should be organized in the memory
 How the flow of data should be controlled
 How efficiently it can be retrieved and manipulated
 How data should be designed and implemented to reduce
the complexity and increase the efficiency of the algorithm
Types of Data Structure
 Basically there are two types of Data Structures:
1) Primitive Data Structures
2) Non Primitive Data Structures
 Primitive Data Structures are in built data
structures for every programming languages.
 Non-Primitive Data Structures are user defined
data structures.
Types of Data Structure
DATA STRUCTURE
PRIMITIVE NON-PRIMITIVE
LINEAR NON-LINEAR
Array
Stack
Queue
Linked List
Tree
Graph
Table
Character
Integer
Floating point
Types of Non-primitive Data Structure
 Linear Data Structures :
 Elements are stored/accessed in sequential manner
from the computer’s memory.
 Non-linear Data Structures :
 Elements are stored randomly in computer’s memory.
References
 Classic Data structures, D. Samanta, Prentice-
Hall International.
 An Introduction to Data Structures with
Applications, Jean-Paul Tremblay, Paul G.
Sorenson, McGraw-hill.
 Data Structures using C & C++, Ten Baum,
Prentice-Hall International.
 Study materials prepared by Prof. Chintan
Gajjar.
Thank You…..

Introduction to data_structure

  • 1.
    Data Structure AndAlgorithm Prf. Purvi Prajapati Department Of Information Technology CSPIT, CHARUSAT
  • 2.
    Outline  Introduction  Algorithm Data & Information  Data Structure  Data Type  Types of Data Type  Importance of Data Structure  Types of Data Structure
  • 3.
    Introduction  Algorithm:  aset of instructions for solving a problem in a finite number of steps. [From : https://www.dictionary.com]  Step-by-step procedures required to solve a problem. For example, to find the largest number in a list of positive numbers.
  • 4.
    Algorithm Al Khawarizmi  Agreat Iranian mathematician, geographer and astronomer. He introduced the zero, negative numbers, algebra and the decimal system. He also invented mathematical programming using a set of instructions to perform complex calculations.  The term algorithm is named after a variation of his name, Algorithmi.
  • 5.
    Algorithm Algorithm is astep-by-step finite sequence of instruction, to solve a well defined computational problem for the given Input and expected Output.
  • 6.
    Data & Information Data means value or a set of values.  35  21/12/2016,  “CHARUSAT”  12, 18, 24, 32  Information means meaningful or processed data.  35 Age of a person  21/12/2016 Date of Birth  “CHARUSAT” Name of the University  12, 18, 14, 30 Marks of a subject DATA Procedure to process data Info-1 Info-2 Info-3 . . . Info-n
  • 7.
    Data Structure  Data:Data is set of items  Structure: How to organize data (A particular way of organizing data in computer)  A data structure is a method for organizing and storing data, which would allow efficient data retrieval and usage.
  • 8.
    Data Structure “I will,in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships. ” - Linus Torvalds (creator of Linux)
  • 9.
    Algorithm + DataStructure = Program -By Niklaus Wirth  Program: An implementation of an algorithm in some programming language
  • 10.
    Data Type  Datatype is a term which refers to the kind of data. That may appear in computation.  35 Numeric (integer)  21/12/2016 Date  “CHARUSAT” String  12, 18, 14, 30 Array of integers
  • 11.
    Types of DataType Data Type Built-in Data Type (BDT) Abstract / User-defined DataType(ADT / UDT) int char float double struct union class Primitive Non- Primitive
  • 12.
    Importance of DataStructure  In computer, manipulation of primitive data does not require any extra effort on the part of user.  In real-life applications, various kinds of data other than primitive data are involved. So, manipulation of real-life data requires following tasks: 1. Storage representation of data 2. Retrieval of stored data 3. Transformation of data
  • 13.
    Importance of DataStructure  Data Structure is used for  How the data should be organized in the memory  How the flow of data should be controlled  How efficiently it can be retrieved and manipulated  How data should be designed and implemented to reduce the complexity and increase the efficiency of the algorithm
  • 14.
    Types of DataStructure  Basically there are two types of Data Structures: 1) Primitive Data Structures 2) Non Primitive Data Structures  Primitive Data Structures are in built data structures for every programming languages.  Non-Primitive Data Structures are user defined data structures.
  • 15.
    Types of DataStructure DATA STRUCTURE PRIMITIVE NON-PRIMITIVE LINEAR NON-LINEAR Array Stack Queue Linked List Tree Graph Table Character Integer Floating point
  • 16.
    Types of Non-primitiveData Structure  Linear Data Structures :  Elements are stored/accessed in sequential manner from the computer’s memory.  Non-linear Data Structures :  Elements are stored randomly in computer’s memory.
  • 17.
    References  Classic Datastructures, D. Samanta, Prentice- Hall International.  An Introduction to Data Structures with Applications, Jean-Paul Tremblay, Paul G. Sorenson, McGraw-hill.  Data Structures using C & C++, Ten Baum, Prentice-Hall International.  Study materials prepared by Prof. Chintan Gajjar.
  • 18.

Editor's Notes

  • #7 We are living in Information Age. Everything around us is information. Information Technology requires information. But for information we have to store data somewhere. How can we store data? After processing on data we will get information. Data can be normal data or complex data. Why storing data is important? : Proper storing and efficient Fetching gives efficient performance in future. We have to store data in such a way that will be easier to fetch it , process it and to store at some other location. That’s why we need data structure. Data Structure is all about efficient storage so we can use it efficiently to get information.
  • #10 Every programming language has inbuilt data structure.