SlideShare uma empresa Scribd logo
1 de 21
DATA STRUCTURE
ChApTER – 1
inTRoDUCTion AnD ovERviEw
Recommended books
 Data Structures By Seymour Lipschutz
[Schaum’s Outline]
 An Introduction to Data structures with
Applications by Tremblay and Sorenson
LECTURE 1 ConTEnTS:-
 Overview
 Basic Terminology
 Introduction to Data Structure
 Data Structure Types
 Data Structure Operations
 Selecting a data structure
ovERviEw:-
 The study of computer science teaches us how to
use computers and how to organize the data so
that they can be manipulated by a program.
 The term data structure refers to a scheme for
organizing data into memory.
 Organization of data in some cases is of immense
importance. Therefore, the data will be stored in a
special way so that the required result should be
calculated as fast as possible.
BASiC TERminoLogy:
 DATA: Data are simply values or set of values. Or
data is raw material which we fed in computer for
processing.
 DATA iTEmS: A data item refers to a single unit of
values.
 gRoUp iTEmS: Data items that are divided into
sub items are called group items.
e.g an employee’s name may divide into three
sub items, first name, middle name, and last
name.
 infoRmATion: Meaningful or processed data.
 EnTiTy: An entity is something that has certain
attributes or properties which may assigned
values.
 In data structure collection of data is frequently
organized in to hierarchy of fields, records and
files.
 fiELD: a field is an single elementary unit of
information representing an attribute of an entity.
 RECoRD: A record is a collection of field values of a
given entity.
 fiLE: A file is a collection of records of the entities
in a given entity set.
Attributes Name Age Address NIC No
Values
Ali 24 Hyd 41303123
Azam 22 Khi 41303254
Adnan 21 Lahore 41312549
Field
Record
File
IntroductIon to data
Structure:
data Structure: A data structure is
specialized format for organizing and storing data.
or
In computer science, a data Structure is a
way of storing data in a computer memory so that
it can be used efficiently.
Importance of Data Structure
 Let’s discuss why we need data structures and what sort of
problems can be solved with their use. Data structures help us to
organize the data in the computer, resulting in more efficient
programs.
 An efficient program executes faster and helps minimize the
usage of resources like memory, disk.
 Computers are getting more powerful with the passage of time
with the increase in CPU speed in GHz, availability of faster
network and the maximization of disk space. Therefore people
have started solving more and more complex problems.
 As computer applications are becoming complex, so there is
need for more resources. This does not mean that we should buy
a new computer to make the application execute faster. Our
effort should be to ensue that the solution is achieved with the
help of programming, data structures and algorithm.
What does organizing the data
mean?
 It means that the data should be arranged in a way that it
is easily accessible.
 Because data is inside the computer and we want to see it.
We may also perform some calculations on it.
 Suppose the data contains some numbers and the
programmer wants to calculate the average, standard
deviation etc. May be we have a list of names and want to
search a particular name in it. To solve such problems,
data structures and algorithm are used.
 Sometimes you may realize that the application is too slow
and taking more time. There are chances that it may be
due to the data structure used, not due to the CPU speed
and memory.
data Structure typeS:-
 Data structure are classified either Linear or non-
linear.
 LInear data Structure: A data structure is linear if every
item is related (or attached) to its pervious and next item (e.g
Array, Linked list)
 non-LInear data Structure: A data structure is non-linear if
every item is attached to many other items in specific ways to
reflect relationships (e.g Trees)
data StructureS typeS
cont….
Linear
Data Structure
Non-Linear
Array
Linked List
Stack
Queues
etc.
Trees
Graphs
data Structure
operatIonS:-
 The data appearing in our data structure is
processed by means of certain operations.
 The following four operations play a major role:
 Transversing
 Searching
 Inserting
 Deleting
 Transversing: Accessing each record exactly once so that
certain items in the record may be processed.
This accessing or processing is sometimes called ‘visiting’ the
records.
 searching: finding the location of the record or finding the
location of all records, which satisfy one or more conditions.
 inserTing: Adding new records to the structure.
 DeleTing: Removing a record from the structure.
Sometimes two or more operations may be used in a given
situation; e.g we may want to delete the record which may
mean we first need to search for record and then delete it from
structure.
DaTa sTrucTure operaTions conT…
 The following two operations which are used in
special situations will also be considered.
 sorTing: Arranging the records in some logical
orders.
 Merging: Combining the records in two
different sorted files into a single file.
selecTing a DaTa sTrucTure:-
 How we can select the data structure?
 There are different kinds of data structure suited to different
kinds of applications and some are highly specialized to
certain tasks.
 Whenever we need to select a data structure we must keep
some points in mind.
 Select the data structure as follows:
 First of all, we have to analyze the problem to
determine the resources constraints that a
solution must meet.
 Secondly, it is necessary to determine the basic
operations that must be supported. Quantify
the resources constraints for each operations.
 Finally, select the data structure that meets
these requirements the maximum.
Algorithm Design/Specifications
 Algorithm: Finite set of instructions that, if followed,
accomplishes a particular task.
 Describe: in natural language / pseudo-code /
diagrams / etc.
 Criteria to follow:
 Input: Zero or more quantities (externally produced)
 Output: One or more quantities
 Definiteness: Clarity, precision of each instruction
 Effectiveness: Each instruction has to be basic
enough and feasible
 Finiteness: The algorithm has to stop after a finite
(may be very large) number of steps
16
Implementation, Testing and Maintenance
 Implementation
 Decide on the programming language to use
 C, C++, Python, Java, Perl, etc.
 Write clean, well documented code
 Test, test, test
 Integrate feedback from users, fix bugs,
ensure compatibility across different
versions  Maintenance 17
Algorithm Analysis
 Space complexity
 How much space is required
 Time complexity
 How much time does it take to run the
algorithm
18
Space Complexity
 Space complexity = The amount of memory
required by an algorithm to run to completion
 the most often encountered cause is “memory
leaks” – the amount of memory required larger
than the memory available on a given system
 Some algorithms may be more efficient if data
completely loaded into memory
 Need to look also at system limitations
 e.g. Classify 2GB of text in various categories –
can I afford to load the entire collection?
19
Space Complexity (cont…)
1. Fixed part: The size required to store certain
data/variables, that is independent of the size of the
problem:
- e.g. name of the data collection
1. Variable part: Space needed by variables, whose
size is dependent on the size of the problem:
- e.g. actual text
- load 2GB of text VS. load 1MB of text
20
Time Complexity
 Often more important than space complexity
 space available tends to be larger and larger
 time is still a problem for all of us
 3-4GHz processors on the market
 still …
 researchers estimate that the computation of
various transformations for 1 single DNA chain for
one single protein on 1 TerraHZ computer would
take about 1 year to run to completion
 Algorithms running time is an important issue
21

Mais conteúdo relacionado

Mais procurados

Array linear data_structure_2 (1)
Array linear data_structure_2 (1)Array linear data_structure_2 (1)
Array linear data_structure_2 (1)
eShikshak
 

Mais procurados (20)

queue & its applications
queue & its applicationsqueue & its applications
queue & its applications
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
 
data structure
data structuredata structure
data structure
 
sparse matrix in data structure
sparse matrix in data structuresparse matrix in data structure
sparse matrix in data structure
 
Array ppt
Array pptArray ppt
Array ppt
 
Queue ppt
Queue pptQueue ppt
Queue ppt
 
Applications of stack
Applications of stackApplications of stack
Applications of stack
 
Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 
Time andspacecomplexity
Time andspacecomplexityTime andspacecomplexity
Time andspacecomplexity
 
Linked list
Linked listLinked list
Linked list
 
Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]
 
Unit 1 introduction to data structure
Unit 1   introduction to data structureUnit 1   introduction to data structure
Unit 1 introduction to data structure
 
Presentation on Elementary data structures
Presentation on Elementary data structuresPresentation on Elementary data structures
Presentation on Elementary data structures
 
Data Structure and Algorithms Binary Search Tree
Data Structure and Algorithms Binary Search TreeData Structure and Algorithms Binary Search Tree
Data Structure and Algorithms Binary Search Tree
 
trees in data structure
trees in data structure trees in data structure
trees in data structure
 
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHIBCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
 
Array linear data_structure_2 (1)
Array linear data_structure_2 (1)Array linear data_structure_2 (1)
Array linear data_structure_2 (1)
 
Introduction to Array ppt
Introduction to Array pptIntroduction to Array ppt
Introduction to Array ppt
 

Semelhante a Chapter 1( intro & overview)

DSA 1- Introduction.pdf
DSA 1- Introduction.pdfDSA 1- Introduction.pdf
DSA 1- Introduction.pdf
AliyanAbbas1
 
Database Management Systems ( Dbms )
Database Management Systems ( Dbms )Database Management Systems ( Dbms )
Database Management Systems ( Dbms )
Patty Buckley
 

Semelhante a Chapter 1( intro & overview) (20)

Lect 1-2
Lect 1-2Lect 1-2
Lect 1-2
 
Lect 1-2 Zaheer Abbas
Lect 1-2 Zaheer AbbasLect 1-2 Zaheer Abbas
Lect 1-2 Zaheer Abbas
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Lecture1 data structure(introduction)
 
Data Structures & Algorithms
Data Structures & AlgorithmsData Structures & Algorithms
Data Structures & Algorithms
 
Lec1
Lec1Lec1
Lec1
 
Lec1
Lec1Lec1
Lec1
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Lesson 1 - Data Structures and Algorithms Overview.pdf
Lesson 1 - Data Structures and Algorithms Overview.pdfLesson 1 - Data Structures and Algorithms Overview.pdf
Lesson 1 - Data Structures and Algorithms Overview.pdf
 
Lect1.pptx
Lect1.pptxLect1.pptx
Lect1.pptx
 
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdfChapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdf
 
DBMS Full.ppt
DBMS Full.pptDBMS Full.ppt
DBMS Full.ppt
 
DSA 1- Introduction.pdf
DSA 1- Introduction.pdfDSA 1- Introduction.pdf
DSA 1- Introduction.pdf
 
UNIT II.docx
UNIT II.docxUNIT II.docx
UNIT II.docx
 
Lesson 1 overview
Lesson 1   overviewLesson 1   overview
Lesson 1 overview
 
Data Structure Introduction chapter 1
Data Structure Introduction chapter 1Data Structure Introduction chapter 1
Data Structure Introduction chapter 1
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2
 
Presentaion on data structure mms-a-28
Presentaion on  data structure mms-a-28Presentaion on  data structure mms-a-28
Presentaion on data structure mms-a-28
 
Database Management Systems ( Dbms )
Database Management Systems ( Dbms )Database Management Systems ( Dbms )
Database Management Systems ( Dbms )
 

Último

CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
gajnagarg
 
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
gajnagarg
 
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
gajnagarg
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
amitlee9823
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 

Último (20)

Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls Bellary Escorts ☎️9352988975 Two shot with one girl ...
 
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
 
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 

Chapter 1( intro & overview)

  • 1. DATA STRUCTURE ChApTER – 1 inTRoDUCTion AnD ovERviEw
  • 2. Recommended books  Data Structures By Seymour Lipschutz [Schaum’s Outline]  An Introduction to Data structures with Applications by Tremblay and Sorenson
  • 3. LECTURE 1 ConTEnTS:-  Overview  Basic Terminology  Introduction to Data Structure  Data Structure Types  Data Structure Operations  Selecting a data structure
  • 4. ovERviEw:-  The study of computer science teaches us how to use computers and how to organize the data so that they can be manipulated by a program.  The term data structure refers to a scheme for organizing data into memory.  Organization of data in some cases is of immense importance. Therefore, the data will be stored in a special way so that the required result should be calculated as fast as possible.
  • 5. BASiC TERminoLogy:  DATA: Data are simply values or set of values. Or data is raw material which we fed in computer for processing.  DATA iTEmS: A data item refers to a single unit of values.  gRoUp iTEmS: Data items that are divided into sub items are called group items. e.g an employee’s name may divide into three sub items, first name, middle name, and last name.  infoRmATion: Meaningful or processed data.  EnTiTy: An entity is something that has certain attributes or properties which may assigned values.
  • 6.  In data structure collection of data is frequently organized in to hierarchy of fields, records and files.  fiELD: a field is an single elementary unit of information representing an attribute of an entity.  RECoRD: A record is a collection of field values of a given entity.  fiLE: A file is a collection of records of the entities in a given entity set. Attributes Name Age Address NIC No Values Ali 24 Hyd 41303123 Azam 22 Khi 41303254 Adnan 21 Lahore 41312549 Field Record File
  • 7. IntroductIon to data Structure: data Structure: A data structure is specialized format for organizing and storing data. or In computer science, a data Structure is a way of storing data in a computer memory so that it can be used efficiently.
  • 8. Importance of Data Structure  Let’s discuss why we need data structures and what sort of problems can be solved with their use. Data structures help us to organize the data in the computer, resulting in more efficient programs.  An efficient program executes faster and helps minimize the usage of resources like memory, disk.  Computers are getting more powerful with the passage of time with the increase in CPU speed in GHz, availability of faster network and the maximization of disk space. Therefore people have started solving more and more complex problems.  As computer applications are becoming complex, so there is need for more resources. This does not mean that we should buy a new computer to make the application execute faster. Our effort should be to ensue that the solution is achieved with the help of programming, data structures and algorithm.
  • 9. What does organizing the data mean?  It means that the data should be arranged in a way that it is easily accessible.  Because data is inside the computer and we want to see it. We may also perform some calculations on it.  Suppose the data contains some numbers and the programmer wants to calculate the average, standard deviation etc. May be we have a list of names and want to search a particular name in it. To solve such problems, data structures and algorithm are used.  Sometimes you may realize that the application is too slow and taking more time. There are chances that it may be due to the data structure used, not due to the CPU speed and memory.
  • 10. data Structure typeS:-  Data structure are classified either Linear or non- linear.  LInear data Structure: A data structure is linear if every item is related (or attached) to its pervious and next item (e.g Array, Linked list)  non-LInear data Structure: A data structure is non-linear if every item is attached to many other items in specific ways to reflect relationships (e.g Trees)
  • 11. data StructureS typeS cont…. Linear Data Structure Non-Linear Array Linked List Stack Queues etc. Trees Graphs
  • 12. data Structure operatIonS:-  The data appearing in our data structure is processed by means of certain operations.  The following four operations play a major role:  Transversing  Searching  Inserting  Deleting
  • 13.  Transversing: Accessing each record exactly once so that certain items in the record may be processed. This accessing or processing is sometimes called ‘visiting’ the records.  searching: finding the location of the record or finding the location of all records, which satisfy one or more conditions.  inserTing: Adding new records to the structure.  DeleTing: Removing a record from the structure. Sometimes two or more operations may be used in a given situation; e.g we may want to delete the record which may mean we first need to search for record and then delete it from structure.
  • 14. DaTa sTrucTure operaTions conT…  The following two operations which are used in special situations will also be considered.  sorTing: Arranging the records in some logical orders.  Merging: Combining the records in two different sorted files into a single file.
  • 15. selecTing a DaTa sTrucTure:-  How we can select the data structure?  There are different kinds of data structure suited to different kinds of applications and some are highly specialized to certain tasks.  Whenever we need to select a data structure we must keep some points in mind.  Select the data structure as follows:  First of all, we have to analyze the problem to determine the resources constraints that a solution must meet.  Secondly, it is necessary to determine the basic operations that must be supported. Quantify the resources constraints for each operations.  Finally, select the data structure that meets these requirements the maximum.
  • 16. Algorithm Design/Specifications  Algorithm: Finite set of instructions that, if followed, accomplishes a particular task.  Describe: in natural language / pseudo-code / diagrams / etc.  Criteria to follow:  Input: Zero or more quantities (externally produced)  Output: One or more quantities  Definiteness: Clarity, precision of each instruction  Effectiveness: Each instruction has to be basic enough and feasible  Finiteness: The algorithm has to stop after a finite (may be very large) number of steps 16
  • 17. Implementation, Testing and Maintenance  Implementation  Decide on the programming language to use  C, C++, Python, Java, Perl, etc.  Write clean, well documented code  Test, test, test  Integrate feedback from users, fix bugs, ensure compatibility across different versions  Maintenance 17
  • 18. Algorithm Analysis  Space complexity  How much space is required  Time complexity  How much time does it take to run the algorithm 18
  • 19. Space Complexity  Space complexity = The amount of memory required by an algorithm to run to completion  the most often encountered cause is “memory leaks” – the amount of memory required larger than the memory available on a given system  Some algorithms may be more efficient if data completely loaded into memory  Need to look also at system limitations  e.g. Classify 2GB of text in various categories – can I afford to load the entire collection? 19
  • 20. Space Complexity (cont…) 1. Fixed part: The size required to store certain data/variables, that is independent of the size of the problem: - e.g. name of the data collection 1. Variable part: Space needed by variables, whose size is dependent on the size of the problem: - e.g. actual text - load 2GB of text VS. load 1MB of text 20
  • 21. Time Complexity  Often more important than space complexity  space available tends to be larger and larger  time is still a problem for all of us  3-4GHz processors on the market  still …  researchers estimate that the computation of various transformations for 1 single DNA chain for one single protein on 1 TerraHZ computer would take about 1 year to run to completion  Algorithms running time is an important issue 21