SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1Kumar
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure NUPOORAWSARMOL
 
Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteRaj vardhan
 
Quick Sort , Merge Sort , Heap Sort
Quick Sort , Merge Sort ,  Heap SortQuick Sort , Merge Sort ,  Heap Sort
Quick Sort , Merge Sort , Heap SortMohammed Hussein
 
Basic terminologies
Basic terminologiesBasic terminologies
Basic terminologiesRajendran
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm KristinaBorooah
 
Data Structure
Data Structure Data Structure
Data Structure Ibrahim MH
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structureadeel hamid
 
Types of Tree in Data Structure in C++
Types of Tree in Data Structure in C++Types of Tree in Data Structure in C++
Types of Tree in Data Structure in C++Himanshu Choudhary
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS Adams Sidibe
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating SystemJanki Shah
 

What's hot (20)

Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure
 
Sorting
SortingSorting
Sorting
 
Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 Complete
 
Abstract Data Types
Abstract Data TypesAbstract Data Types
Abstract Data Types
 
Quick Sort , Merge Sort , Heap Sort
Quick Sort , Merge Sort ,  Heap SortQuick Sort , Merge Sort ,  Heap Sort
Quick Sort , Merge Sort , Heap Sort
 
Basic terminologies
Basic terminologiesBasic terminologies
Basic terminologies
 
Computer Science-Data Structures :Abstract DataType (ADT)
Computer Science-Data Structures :Abstract DataType (ADT)Computer Science-Data Structures :Abstract DataType (ADT)
Computer Science-Data Structures :Abstract DataType (ADT)
 
Data Structures
Data StructuresData Structures
Data Structures
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
 
Data structures using c
Data structures using cData structures using c
Data structures using c
 
Data models
Data modelsData models
Data models
 
Data Structure
Data Structure Data Structure
Data Structure
 
Data Structures & Algorithms
Data Structures & AlgorithmsData Structures & Algorithms
Data Structures & Algorithms
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Types of Tree in Data Structure in C++
Types of Tree in Data Structure in C++Types of Tree in Data Structure in C++
Types of Tree in Data Structure in C++
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS
 
DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 

Similar to Chapter 1( intro & overview)

Similar to 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)
 
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 )
 
data structures and its importance
 data structures and its importance  data structures and its importance
data structures and its importance
 

Recently uploaded

Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.natarajan8993
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一F La
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxBoston Institute of Analytics
 

Recently uploaded (20)

Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
办理(UWIC毕业证书)英国卡迪夫城市大学毕业证成绩单原版一比一
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
 

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