SlideShare une entreprise Scribd logo
1  sur  11
09 September 2022
BINARY SEARCH
P R E S E N T E D B Y :
D E B A B R A T A H A L D E R - 2 1 E E L C S 0 1 2
N I D H I Y A D A V - 2 1 E E L C S 0 2 6
S U B M I T T E D T O :
M r . D H A W A L V Y A S
M r . S U M I T K U M A R
G O V E R N M E N T E N G I N E E R I N G C O L L E G E B H A R A T P U R
INTRODUCTION
Computer Systems are used to store a lot of information from
which individual records must be recovered.
Therefore, searching is an algorithmic methodology of
discovering a specific thing in an accumulation of things.
WHAT IS BINARY
SEARCH?
A binary search algorithm searches the location or say position
of a specified input value within an array sorted by key value.
It is one of the algorithms that are used to find the item along
with its location in a sorted array by just dividing the array into
halves.
Binary Search is an O(log n) calculation, which is more proficient
than a linear search.
BINARY SEARCH ALGORITHM
If the value of the search key is equal to the item then
return an index of the search key.
2
Begin with the mid element of the whole array as a
search key.
1
Or if the value of the search key is less than the item in the
middle of the interval, narrow the interval to the lower
half.
3
Otherwise, narrow it to the upper half.
4
Repeatedly check from the second point until the value is
found or the interval is empty.
5
FLOWCHART
Algorithm visualization illustrates how algorithms work in
a graphical way. It mainly aims to simplify and deepen the
understanding of algorithms operation.
WHY ALGORITHM
VISUALIZATIONS?
Explain concepts in visual terms
Encourage a practical learning process
Experiment and explore the ideas with respect
to their individual needs.
Better than a Linear Search Algorithm.
Since its run time complexity is O(log N).
At each iteration, it eliminates half of the list and
significantly reduces the search space.
ADVANTAGES
It works even when the array is rotated by some
position and finds the target element.
TOOLS & TECHNOLOGY
Python
LANGUAGE
Pygame
LIBRARY
Visual Studio Code
TOOLS
Recursive method requires more stack space.
Error prone and difficult.
CHALLENGES
Caching is poor.
REFERENCES
ResearchGate
GeeksforGeeks
YouTube
THANK YOU
FOR YOUR UNWAVERING ATTENTION
It’s audiences like you that make presentations
awesome. Cheers :)

Contenu connexe

Similaire à Binary Search

Basics in algorithms and data structure
Basics in algorithms and data structure Basics in algorithms and data structure
Basics in algorithms and data structure
Eman magdy
 
DS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptxDS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptx
prakashvs7
 
ODD EVEN BASED BINARY SEARCH
ODD EVEN BASED BINARY SEARCHODD EVEN BASED BINARY SEARCH
ODD EVEN BASED BINARY SEARCH
IAEME Publication
 

Similaire à Binary Search (20)

COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERINGCOMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
 
cs702 ppt.ppt
cs702 ppt.pptcs702 ppt.ppt
cs702 ppt.ppt
 
machine learning
machine learningmachine learning
machine learning
 
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
 
Binary search algorithm
Binary search algorithmBinary search algorithm
Binary search algorithm
 
Binary search(data structure and algorithm
Binary search(data structure  and  algorithmBinary search(data structure  and  algorithm
Binary search(data structure and algorithm
 
Lecture_Oct26.pptx
Lecture_Oct26.pptxLecture_Oct26.pptx
Lecture_Oct26.pptx
 
Alogorithm ppr slideshow
Alogorithm ppr slideshowAlogorithm ppr slideshow
Alogorithm ppr slideshow
 
Linear search-and-binary-search
Linear search-and-binary-searchLinear search-and-binary-search
Linear search-and-binary-search
 
Searching.pptx
Searching.pptxSearching.pptx
Searching.pptx
 
Basics in algorithms and data structure
Basics in algorithms and data structure Basics in algorithms and data structure
Basics in algorithms and data structure
 
Rahat & juhith
Rahat & juhithRahat & juhith
Rahat & juhith
 
Data operatons & searching and sorting algorithms
Data operatons & searching and sorting algorithmsData operatons & searching and sorting algorithms
Data operatons & searching and sorting algorithms
 
Data Structures_ Sorting & Searching
Data Structures_ Sorting & SearchingData Structures_ Sorting & Searching
Data Structures_ Sorting & Searching
 
DS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptxDS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptx
 
Binary search
Binary searchBinary search
Binary search
 
ODD EVEN BASED BINARY SEARCH
ODD EVEN BASED BINARY SEARCHODD EVEN BASED BINARY SEARCH
ODD EVEN BASED BINARY SEARCH
 
Searching and Sorting Unit II Part I.pptx
Searching and Sorting Unit II Part I.pptxSearching and Sorting Unit II Part I.pptx
Searching and Sorting Unit II Part I.pptx
 
Binary search tree operations
Binary search tree operationsBinary search tree operations
Binary search tree operations
 
Iare ds ppt_3
Iare ds ppt_3Iare ds ppt_3
Iare ds ppt_3
 

Plus de Debabrata Halder

Plus de Debabrata Halder (10)

CCNA: Routing and Switching Fundamentals
CCNA: Routing and Switching FundamentalsCCNA: Routing and Switching Fundamentals
CCNA: Routing and Switching Fundamentals
 
Design and Implementation of a Secure File Sharing Transfer
Design and Implementation of a Secure File Sharing TransferDesign and Implementation of a Secure File Sharing Transfer
Design and Implementation of a Secure File Sharing Transfer
 
Force and Laws of Motion
Force and Laws of MotionForce and Laws of Motion
Force and Laws of Motion
 
Magnetic Effects of Electric Current
Magnetic Effects of Electric CurrentMagnetic Effects of Electric Current
Magnetic Effects of Electric Current
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Cyber Crime - Don’t be a victim
Cyber Crime - Don’t be a victimCyber Crime - Don’t be a victim
Cyber Crime - Don’t be a victim
 
Physiography Division of India
Physiography Division of IndiaPhysiography Division of India
Physiography Division of India
 
Forest Fire in Uttarakhand, India
Forest Fire in Uttarakhand, IndiaForest Fire in Uttarakhand, India
Forest Fire in Uttarakhand, India
 
Computer Networking
Computer NetworkingComputer Networking
Computer Networking
 
Place Visited During Vacation
Place Visited During VacationPlace Visited During Vacation
Place Visited During Vacation
 

Dernier

Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
Sampad Kar
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Lovely Professional University
 
1893-part-1-2016 for Earthquake load design
1893-part-1-2016 for Earthquake load design1893-part-1-2016 for Earthquake load design
1893-part-1-2016 for Earthquake load design
AshishSingh1301
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
rahulmanepalli02
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
Kamal Acharya
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 

Dernier (20)

Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
1893-part-1-2016 for Earthquake load design
1893-part-1-2016 for Earthquake load design1893-part-1-2016 for Earthquake load design
1893-part-1-2016 for Earthquake load design
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
 
Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptx
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 

Binary Search

  • 1. 09 September 2022 BINARY SEARCH P R E S E N T E D B Y : D E B A B R A T A H A L D E R - 2 1 E E L C S 0 1 2 N I D H I Y A D A V - 2 1 E E L C S 0 2 6 S U B M I T T E D T O : M r . D H A W A L V Y A S M r . S U M I T K U M A R G O V E R N M E N T E N G I N E E R I N G C O L L E G E B H A R A T P U R
  • 2. INTRODUCTION Computer Systems are used to store a lot of information from which individual records must be recovered. Therefore, searching is an algorithmic methodology of discovering a specific thing in an accumulation of things.
  • 3. WHAT IS BINARY SEARCH? A binary search algorithm searches the location or say position of a specified input value within an array sorted by key value. It is one of the algorithms that are used to find the item along with its location in a sorted array by just dividing the array into halves. Binary Search is an O(log n) calculation, which is more proficient than a linear search.
  • 4. BINARY SEARCH ALGORITHM If the value of the search key is equal to the item then return an index of the search key. 2 Begin with the mid element of the whole array as a search key. 1 Or if the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half. 3 Otherwise, narrow it to the upper half. 4 Repeatedly check from the second point until the value is found or the interval is empty. 5
  • 6. Algorithm visualization illustrates how algorithms work in a graphical way. It mainly aims to simplify and deepen the understanding of algorithms operation. WHY ALGORITHM VISUALIZATIONS? Explain concepts in visual terms Encourage a practical learning process Experiment and explore the ideas with respect to their individual needs.
  • 7. Better than a Linear Search Algorithm. Since its run time complexity is O(log N). At each iteration, it eliminates half of the list and significantly reduces the search space. ADVANTAGES It works even when the array is rotated by some position and finds the target element.
  • 9. Recursive method requires more stack space. Error prone and difficult. CHALLENGES Caching is poor.
  • 11. THANK YOU FOR YOUR UNWAVERING ATTENTION It’s audiences like you that make presentations awesome. Cheers :)