SlideShare a Scribd company logo
By Mr.Solomon E.
Chapter 3
Data Structure
By Mr.Solomon E.
Data Structure
What is a Data Structure?
• A data structure is a way of organizing, managing, and storing data so
that it can be accessed and modified efficiently.
• It provides a systematic way to perform operations on data, such as
insertion, deletion, searching, and sorting.
• Why Are Data Structures Important?
They help in organizing data for better efficiency and performance.
They are essential for implementing algorithms.
By Mr.Solomon E.
Types of Data Structures
• Linear Data Structures: Data is arranged in a sequential manner.
e.g. Array, Stack, Queue, Linked list..
• Non-Linear Data Structures: Data is arranged hierarchically or in a
non-sequential manner. e.g. Tree, Graph..
• Hash-Based Data Structures: Data is stored and retrieved using a key-
value pair. e.g. Hash table
By Mr.Solomon E.
Linear Data Structures
Array
• A collection of elements stored at contiguous memory
locations.
• store a collection of elements of the same data type
• Accessed using an index.
• Arrays excel at providing fast, direct access to elements
However, their fixed size can be a limitation
Example: An array of integers: [10, 20, 30, 40]
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
Cont..
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
Use arrow notation (temp->field) to access node fields.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
What is the time complexity of the Linear Search algorithm in the worst case?
**
a) O(1)
b) O(log n)
c) O(n)
d) O(n²)
By Mr.Solomon E.
Which of the following is a requirement for the Binary Search algorithm to work correctly?
a) The array must be unsorted
b) The array must be sorted
c) The array must contain duplicate elements
d) The array must be of size n > 100
By Mr.Solomon E.
In a Binary Search, if the search key is greater than the middle element, what happens next?
a) The search continues in the first half of the array
b) The search continues in the second half of the array
c) The search terminates unsuccessfully
d) The middle element is swapped with the key
By Mr.Solomon E.
Which sorting algorithm works by repeatedly finding the smallest element and placing it at the
beginning?
a) Insertion Sort
b) Selection Sort
c) Bubble Sort
d) Linear Sort
By Mr.Solomon E.
What does O(1) time complexity indicate?
a) The runtime grows linearly with the input size
b) The runtime is constant regardless of input size
c) The runtime grows logarithmically with the input size
d) The runtime grows quadratically with the input size
By Mr.Solomon E.
By Mr.Solomon E.
By Mr.Solomon E.
Q?

More Related Content

PDF
Data-Structure-using-C-Rajesh-Pandey.pdf
PPTX
Data Structures Unit 2 FINAL presentation.pptx
PDF
Data Structures & Algorithms - Spring 2025.pdf
PPTX
Unit 2 linear data structures
PPTX
Data structure chapter 1.pptx
PPTX
Algorithms.pptx
PPSX
Data Structure # vpmp polytechnic
Data-Structure-using-C-Rajesh-Pandey.pdf
Data Structures Unit 2 FINAL presentation.pptx
Data Structures & Algorithms - Spring 2025.pdf
Unit 2 linear data structures
Data structure chapter 1.pptx
Algorithms.pptx
Data Structure # vpmp polytechnic

Similar to Data Structure and Algorithm Chapter 3.ppsxDSA Chapter 3.ppsx (20)

PDF
SearchAlgorithm.pdf
PPTX
Introduction to Data Structures and their importance
PPTX
DSA Ch1(Introduction) [Recovered].pptx
PDF
1_Algo_lyst1729856407228_lyst1736581584300.pdf
PDF
Unit 1 OF DS FOR AI DS BTRCH OF DS FOR AI DS BTRCH .pdf
PPT
Data Structures 6
PDF
Data structures (introduction)
PPT
Data Structures 5
PPT
b,Sc it data structure.ppt
PDF
unit 1 ds.INTRODUCTION TO DATA STRUCTURES
PPTX
project on data structures and algorithm
PPTX
Circular Linked List.pptx
PPTX
Insertion sort
PPTX
Data Structures - Lecture 2 [Introduction to Data Structures]
PPTX
b,Sc it data structure.pptx
PPTX
INTRODUCTION TO DATA STRUCTURE.pptx
PPTX
Sorting-Algorithms-A-Comprehensive-Guide.pptx
PPTX
DS Module1 (1).pptx
PPTX
data structure and algorithms arrayby anay.pptx
PPSX
Data Structure and Algorithm Chapter 2.ppsx Chapter 2.ppsx
SearchAlgorithm.pdf
Introduction to Data Structures and their importance
DSA Ch1(Introduction) [Recovered].pptx
1_Algo_lyst1729856407228_lyst1736581584300.pdf
Unit 1 OF DS FOR AI DS BTRCH OF DS FOR AI DS BTRCH .pdf
Data Structures 6
Data structures (introduction)
Data Structures 5
b,Sc it data structure.ppt
unit 1 ds.INTRODUCTION TO DATA STRUCTURES
project on data structures and algorithm
Circular Linked List.pptx
Insertion sort
Data Structures - Lecture 2 [Introduction to Data Structures]
b,Sc it data structure.pptx
INTRODUCTION TO DATA STRUCTURE.pptx
Sorting-Algorithms-A-Comprehensive-Guide.pptx
DS Module1 (1).pptx
data structure and algorithms arrayby anay.pptx
Data Structure and Algorithm Chapter 2.ppsx Chapter 2.ppsx
Ad

More from SolomonEndalu (12)

PPT
Research methodology for computer scienceTechnical Report MAS.ppt
PPTX
manual Networking LAB SESSION 1 PPT.pptx
PPTX
LAB SESSION 3 PPT.pptxNetworking lab manual LAB SESSION 1 PPT.pptx
PPTX
Networking lab manual LAB SESSION 1 PPT.pptx
PPSX
Data Structure and Algorithm Chapter 1.ppsx
PPTX
Chapter 2. data structure and algorithm
PPTX
chapter_7 _Other Emerging Technologies-new.pptx
PPTX
Chapter 5 ARIntroduction to Emerging Technologies
PPTX
Emerging Technology Chapter 4 internets of things
PPTX
chapter_1_Introduction to Emerging Technologies
PPTX
Emerging Technology Chapter 3 Artificial Intelligence
PPTX
Emerging Technology Chapter 2 Data Science
Research methodology for computer scienceTechnical Report MAS.ppt
manual Networking LAB SESSION 1 PPT.pptx
LAB SESSION 3 PPT.pptxNetworking lab manual LAB SESSION 1 PPT.pptx
Networking lab manual LAB SESSION 1 PPT.pptx
Data Structure and Algorithm Chapter 1.ppsx
Chapter 2. data structure and algorithm
chapter_7 _Other Emerging Technologies-new.pptx
Chapter 5 ARIntroduction to Emerging Technologies
Emerging Technology Chapter 4 internets of things
chapter_1_Introduction to Emerging Technologies
Emerging Technology Chapter 3 Artificial Intelligence
Emerging Technology Chapter 2 Data Science
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
Teaching material agriculture food technology
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Cloud computing and distributed systems.
PDF
Electronic commerce courselecture one. Pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Approach and Philosophy of On baking technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
cuic standard and advanced reporting.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
Digital-Transformation-Roadmap-for-Companies.pptx
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
Cloud computing and distributed systems.
Electronic commerce courselecture one. Pdf
The AUB Centre for AI in Media Proposal.docx
“AI and Expert System Decision Support & Business Intelligence Systems”
Per capita expenditure prediction using model stacking based on satellite ima...
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm
Approach and Philosophy of On baking technology
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Weekly Chronicles - August'25 Week I
The Rise and Fall of 3GPP – Time for a Sabbatical?
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MIND Revenue Release Quarter 2 2025 Press Release
cuic standard and advanced reporting.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Network Security Unit 5.pdf for BCA BBA.

Data Structure and Algorithm Chapter 3.ppsxDSA Chapter 3.ppsx