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

linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
shameen khan
 
Array in-c
Array in-cArray in-c
Array in-c
Samsil Arefin
 
Doubly Linked List
Doubly Linked ListDoubly Linked List
Doubly Linked List
Ninad Mankar
 
Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)
Saket Pathak
 
stack & queue
stack & queuestack & queue
stack & queue
manju rani
 
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)
St Mary's College,Thrissur,Kerala
 
Array operations
Array operationsArray operations
Array operations
ZAFAR444
 
Stack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADTStack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADT
Soumen Santra
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
Elavarasi K
 
Abstract Data Types
Abstract Data TypesAbstract Data Types
Abstract Data Types
karthikeyanC40
 
Arrays in C language
Arrays in C languageArrays in C language
Arrays in C language
Shubham Sharma
 
Linked lists
Linked listsLinked lists
Linked lists
SARITHA REDDY
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
KristinaBorooah
 
Queue ppt
Queue pptQueue ppt
Queue ppt
SouravKumar328
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
Mohammed Hussein
 
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
Rabin BK
 
Project of data structure
Project of data structureProject of data structure
Project of data structure
Umme habiba
 
Sorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha MajumderSorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha Majumder
Ashin Guha Majumder
 
queue & its applications
queue & its applicationsqueue & its applications
queue & its applications
somendra kumar
 

What's hot (20)

linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
 
Array in-c
Array in-cArray in-c
Array in-c
 
Doubly Linked List
Doubly Linked ListDoubly Linked List
Doubly Linked List
 
Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)
 
stack & queue
stack & queuestack & queue
stack & queue
 
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)
 
Array operations
Array operationsArray operations
Array operations
 
Stack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADTStack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADT
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
 
Abstract Data Types
Abstract Data TypesAbstract Data Types
Abstract Data Types
 
Arrays in C language
Arrays in C languageArrays in C language
Arrays in C language
 
Linked lists
Linked listsLinked lists
Linked lists
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
 
single linked list
single linked listsingle linked list
single linked list
 
Queue ppt
Queue pptQueue ppt
Queue ppt
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
 
Project of data structure
Project of data structureProject of data structure
Project of data structure
 
Sorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha MajumderSorting Seminar Presentation by Ashin Guha Majumder
Sorting Seminar Presentation by Ashin Guha Majumder
 
queue & its applications
queue & its applicationsqueue & its applications
queue & its applications
 

Similar to Chapter 1( intro & overview)

Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
sunilchute1
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
sunilchute1
 
Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
WaelGomaa15
 
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
LeandroJrErcia
 
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
Axmedcarb
 
DBMS Full.ppt
DBMS Full.pptDBMS Full.ppt
DBMS Full.ppt
pritikanamaity600
 
DSA 1- Introduction.pdf
DSA 1- Introduction.pdfDSA 1- Introduction.pdf
DSA 1- Introduction.pdf
AliyanAbbas1
 
UNIT II.docx
UNIT II.docxUNIT II.docx
UNIT II.docx
Revathiparamanathan
 
Lesson 1 overview
Lesson 1   overviewLesson 1   overview
Lesson 1 overview
MLG College of Learning, Inc
 
Data Structure Introduction chapter 1
Data Structure Introduction chapter 1Data Structure Introduction chapter 1
Data Structure Introduction chapter 1
vasantiDutta1
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2
RajSingh734307
 
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
KhanSayeed2
 
Database Management Systems ( Dbms )
Database Management Systems ( Dbms )Database Management Systems ( Dbms )
Database Management Systems ( Dbms )
Patty Buckley
 

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)
 
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 )
 

Recently uploaded

做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
2023240532
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 

Recently uploaded (20)

做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 

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