SlideShare a Scribd company logo
DATA STRUCTURES AND ALGORITHMS
DATA STRUCTURES AND ALGORITHMS - DEFINED
Data structure
 is an arrangement of data in a computer's memory or even disk storage.
Examples : Arrays, lists, sets, queues, stacks, binary trees, hash tables, and graphs.
Algorithms
 are used to manipulate the data contained in these data structures as in searching and sorting.
Many algorithms apply directly to a specific data structures. When working with certain data structures you need
to know how to insert new data, search for a specified item, and deleting a specific item.
DATA STRUCTURES AND ALGORITHMS - DEFINED
Commonly used algorithms include are useful for:
 Searching for a particular data item (or record).
 Sorting the data.
 Iterating through all the items in a data structure. (Visiting each item in turn so as to display it
or perform some other action on these items)
WHY DO WE NEED DATA STRUCTURES ?
 Data structure is a particular way of storing and organizing information in a
computer so that it can be retrieved and used most productively.
 Each Data Structure allows data to be stored in specific manner.
 Data Structure allows efficient data search and retrieval.
 Specific Data structures are decided to work for specific problems.
 It allows to manage large amount of data such as large databases and indexing services such
as hash table.
The choice of data structure and algorithm can make the difference between a program running in a few
seconds or many days.
HOW TO SELECT DATA STRUCTURE?
When selecting a data structure to solve a problem, you should follow these steps.
1. Analyze your problem to determine the basic operations that must be supported. Examples of
basic operations include inserting a data item into the data structure, deleting a data item from
the data structure, and finding a specified data item.
2. Quantify the resource constraints for each operation.
3. Select the data structure that best meets these requirements
Some questions to ask:
 Are all data inserted into the data structure at the beginning, or are insertions interspersed with other
operations?
 Can data be deleted?
 Are all data processed in some well-defined order, or is random access allowed?
DATA STRUCTURE PHILOSOPHY
1. Each data structure has costs and benefits.
2. Rarely is one data structure better than another in all situations.
3. A data structure requires:
 space for each data item it stores,
 time to perform each basic operation,
 programming effort.
4. Each problem has constraints on available space and time.
5. Only after a careful analysis of problem characteristics can we know the best
data structure for the task.
ABSTRACT DATA TYPES
 A type is a collection of values.
 A data type is a type together with a collection of operations to manipulate the type.
 A data item is a piece of information or a record whose value is drawn from a type. A data item is said to be a
member of a type.
 An abstract data type (ADT) is the specification of a data type within some language, independent of an
implementation.
 The interface for the ADT is defined in terms of a type and a set of operations on that type.
 The behavior of each operation is determined by its inputs and outputs.
 An ADT does not specify how the data type is implemented.
 These implementation details are hidden from the user of the ADT and protected from outside access, a concept referred to as encapsulation.
 A data structure is the implementation for an ADT.
 In an object-oriented language, an ADT and its implementation together make up a class.
 Each operation associated with the ADT is implemented by a member function or method.
 The variables that define the space required by a data item are referred to as data members.
 An object is an instance of a class, that is, something that is created and takes up storage during the execution of a computer program.
MOTIVATING QUOTATIONS
“Every program depends on algorithms and data
structures, but few programs depend on the invention of
brand new ones.”
-- Kernighan & Pike!
“I will, in fact, claim that the difference between a bad
programmer and a good one is whether he considers his
code or his data structures more important. Bad
programmers worry about the code. Good programmers
worry about data structures and their relationships.”
-- Linus Torvalds!

More Related Content

PPTX
Lecture 01
DOC
data structures and algorithm Cha 1and 2.doc
PPTX
data structures and its importance
PPT
Introduction To Data Structures.ppt
PPTX
Chapter two data structure and algorthms.pptx
PPTX
INTRODUCTION TO DATA STRUCTURE & ABSTRACT DATA TYPE.pptx
PPT
DATA STRUCTURE AND ALGORITHMS
PPT
Lecture 01
data structures and algorithm Cha 1and 2.doc
data structures and its importance
Introduction To Data Structures.ppt
Chapter two data structure and algorthms.pptx
INTRODUCTION TO DATA STRUCTURE & ABSTRACT DATA TYPE.pptx
DATA STRUCTURE AND ALGORITHMS

Similar to Lesson 1 - Data Structures and Algorithms Overview.pdf (20)

PPTX
Chapter 1 _edited.pptx.software engineering
PPTX
Chapter 1 _edited.pptx.software engineering
PPT
Chapter 1( intro & overview)
PDF
Unit-I PPT hususi sisooshsgv. Eijeieieooekejj
PPTX
Data Structure Introduction chapter 1
PPTX
Data Structure and Algorithms
PPT
Data Structures & Algorithms
PPTX
EE-232-LEC-01 Data_structures.pptx
PDF
Iare ds lecture_notes_2
PPTX
DSA - Lesson 1-1Introductio to data struct.pptx
PDF
PPTX
DSA(Lec-1,2,3) For C++ Introduction for basics
PPTX
DSA - Lesson 1 INtroduction to database.pptx
PPTX
1-Introduction to Data Structures beginner.pptx
PDF
Data structure and Alogorithm analysis unit one
PDF
01VD062009003760042.pdf
PPTX
datastructuresandalgorithm-module1-230307012644-4c895c84.pptx
PPTX
Introduction to Data Structures
PPTX
chapter 1 Introduction to Ds and Algorithm Anyasis.pptx
Chapter 1 _edited.pptx.software engineering
Chapter 1 _edited.pptx.software engineering
Chapter 1( intro & overview)
Unit-I PPT hususi sisooshsgv. Eijeieieooekejj
Data Structure Introduction chapter 1
Data Structure and Algorithms
Data Structures & Algorithms
EE-232-LEC-01 Data_structures.pptx
Iare ds lecture_notes_2
DSA - Lesson 1-1Introductio to data struct.pptx
DSA(Lec-1,2,3) For C++ Introduction for basics
DSA - Lesson 1 INtroduction to database.pptx
1-Introduction to Data Structures beginner.pptx
Data structure and Alogorithm analysis unit one
01VD062009003760042.pdf
datastructuresandalgorithm-module1-230307012644-4c895c84.pptx
Introduction to Data Structures
chapter 1 Introduction to Ds and Algorithm Anyasis.pptx
Ad

Recently uploaded (20)

PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
01-Introduction-to-Information-Management.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
master seminar digital applications in india
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Insiders guide to clinical Medicine.pdf
Pharma ospi slides which help in ospi learning
Renaissance Architecture: A Journey from Faith to Humanism
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
GDM (1) (1).pptx small presentation for students
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Sports Quiz easy sports quiz sports quiz
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
STATICS OF THE RIGID BODIES Hibbelers.pdf
VCE English Exam - Section C Student Revision Booklet
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
01-Introduction-to-Information-Management.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
master seminar digital applications in india
Abdominal Access Techniques with Prof. Dr. R K Mishra
human mycosis Human fungal infections are called human mycosis..pptx
Ad

Lesson 1 - Data Structures and Algorithms Overview.pdf

  • 1. DATA STRUCTURES AND ALGORITHMS
  • 2. DATA STRUCTURES AND ALGORITHMS - DEFINED Data structure  is an arrangement of data in a computer's memory or even disk storage. Examples : Arrays, lists, sets, queues, stacks, binary trees, hash tables, and graphs. Algorithms  are used to manipulate the data contained in these data structures as in searching and sorting. Many algorithms apply directly to a specific data structures. When working with certain data structures you need to know how to insert new data, search for a specified item, and deleting a specific item.
  • 3. DATA STRUCTURES AND ALGORITHMS - DEFINED Commonly used algorithms include are useful for:  Searching for a particular data item (or record).  Sorting the data.  Iterating through all the items in a data structure. (Visiting each item in turn so as to display it or perform some other action on these items)
  • 4. WHY DO WE NEED DATA STRUCTURES ?  Data structure is a particular way of storing and organizing information in a computer so that it can be retrieved and used most productively.  Each Data Structure allows data to be stored in specific manner.  Data Structure allows efficient data search and retrieval.  Specific Data structures are decided to work for specific problems.  It allows to manage large amount of data such as large databases and indexing services such as hash table. The choice of data structure and algorithm can make the difference between a program running in a few seconds or many days.
  • 5. HOW TO SELECT DATA STRUCTURE? When selecting a data structure to solve a problem, you should follow these steps. 1. Analyze your problem to determine the basic operations that must be supported. Examples of basic operations include inserting a data item into the data structure, deleting a data item from the data structure, and finding a specified data item. 2. Quantify the resource constraints for each operation. 3. Select the data structure that best meets these requirements Some questions to ask:  Are all data inserted into the data structure at the beginning, or are insertions interspersed with other operations?  Can data be deleted?  Are all data processed in some well-defined order, or is random access allowed?
  • 6. DATA STRUCTURE PHILOSOPHY 1. Each data structure has costs and benefits. 2. Rarely is one data structure better than another in all situations. 3. A data structure requires:  space for each data item it stores,  time to perform each basic operation,  programming effort. 4. Each problem has constraints on available space and time. 5. Only after a careful analysis of problem characteristics can we know the best data structure for the task.
  • 7. ABSTRACT DATA TYPES  A type is a collection of values.  A data type is a type together with a collection of operations to manipulate the type.  A data item is a piece of information or a record whose value is drawn from a type. A data item is said to be a member of a type.  An abstract data type (ADT) is the specification of a data type within some language, independent of an implementation.  The interface for the ADT is defined in terms of a type and a set of operations on that type.  The behavior of each operation is determined by its inputs and outputs.  An ADT does not specify how the data type is implemented.  These implementation details are hidden from the user of the ADT and protected from outside access, a concept referred to as encapsulation.  A data structure is the implementation for an ADT.  In an object-oriented language, an ADT and its implementation together make up a class.  Each operation associated with the ADT is implemented by a member function or method.  The variables that define the space required by a data item are referred to as data members.  An object is an instance of a class, that is, something that is created and takes up storage during the execution of a computer program.
  • 8. MOTIVATING QUOTATIONS “Every program depends on algorithms and data structures, but few programs depend on the invention of brand new ones.” -- Kernighan & Pike! “I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships.” -- Linus Torvalds!