SlideShare a Scribd company logo
1 of 6
Start
Search
Item
Set index to
1
Set found to
false
While not
found and
not end of
array
If item =
search
Found =
true
If
true
Item
output
found
Item not
found
Location =
index
No Yes
Yes
YesNo
No
Start
Input item
searching
for
Set found to false
Set bottom to 0
Set top to (MAX -1)
elements
While
bottom <=
top and not
found
Middle = (bottom +
top)/2
If list at
middle =
item
Found = true
If list at
middle <
item
Location = middle
Bottom = middle + 1
Top = middle - 1
If found =
true
Output
item was
not found
Output
location
item found
Stop
Yes
No
Yes
Yes
Yes
No
Yes
No

More Related Content

What's hot

Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
Navtar Sidhu Brar
 
03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdf03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdf
KkSingh64
 
Quick sort algorithn
Quick sort algorithnQuick sort algorithn
Quick sort algorithn
Kumar
 

What's hot (20)

Analysis of Algorithm (Bubblesort and Quicksort)
Analysis of Algorithm (Bubblesort and Quicksort)Analysis of Algorithm (Bubblesort and Quicksort)
Analysis of Algorithm (Bubblesort and Quicksort)
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
 
Quick sort
Quick sortQuick sort
Quick sort
 
What is Link list? explained with animations
What is Link list? explained with animationsWhat is Link list? explained with animations
What is Link list? explained with animations
 
Accrual plan set up in oracle hrms
Accrual plan set up in oracle hrmsAccrual plan set up in oracle hrms
Accrual plan set up in oracle hrms
 
Data_structure using C-Adi.pdf
Data_structure using C-Adi.pdfData_structure using C-Adi.pdf
Data_structure using C-Adi.pdf
 
03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdf03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdf
 
SQL
SQLSQL
SQL
 
Lect 1-2
Lect 1-2Lect 1-2
Lect 1-2
 
Queues
QueuesQueues
Queues
 
Queue data structure
Queue data structureQueue data structure
Queue data structure
 
Item import in Product Data Hub
Item import in Product Data HubItem import in Product Data Hub
Item import in Product Data Hub
 
Engineering in oracle
Engineering in oracleEngineering in oracle
Engineering in oracle
 
Data structures - unit 1
Data structures - unit 1Data structures - unit 1
Data structures - unit 1
 
Sorting
SortingSorting
Sorting
 
Quick sort algorithn
Quick sort algorithnQuick sort algorithn
Quick sort algorithn
 
Oracle ebs otl setup document
Oracle ebs otl setup documentOracle ebs otl setup document
Oracle ebs otl setup document
 
Circular queue
Circular queueCircular queue
Circular queue
 
Oracle HRMS Proration
Oracle HRMS ProrationOracle HRMS Proration
Oracle HRMS Proration
 
Pivot Table | Statistics
Pivot Table | StatisticsPivot Table | Statistics
Pivot Table | Statistics
 

More from hout300

Definitions for yr 7
Definitions for yr 7Definitions for yr 7
Definitions for yr 7
hout300
 
Advantages & disadvantages of system life cycles
Advantages & disadvantages of system life cyclesAdvantages & disadvantages of system life cycles
Advantages & disadvantages of system life cycles
hout300
 
Ct lightbot solutions booklet
Ct   lightbot solutions bookletCt   lightbot solutions booklet
Ct lightbot solutions booklet
hout300
 
Adventure game
Adventure gameAdventure game
Adventure game
hout300
 
Docummentation for adventure game
Docummentation for adventure gameDocummentation for adventure game
Docummentation for adventure game
hout300
 

More from hout300 (7)

Definitions for yr 7
Definitions for yr 7Definitions for yr 7
Definitions for yr 7
 
Advantages & disadvantages of system life cycles
Advantages & disadvantages of system life cyclesAdvantages & disadvantages of system life cycles
Advantages & disadvantages of system life cycles
 
Ct lightbot solutions booklet
Ct   lightbot solutions bookletCt   lightbot solutions booklet
Ct lightbot solutions booklet
 
Adventure game
Adventure gameAdventure game
Adventure game
 
Quiz
QuizQuiz
Quiz
 
Kodu
KoduKodu
Kodu
 
Docummentation for adventure game
Docummentation for adventure gameDocummentation for adventure game
Docummentation for adventure game
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Search flowchart

  • 1.
  • 2. Start Search Item Set index to 1 Set found to false While not found and not end of array If item = search Found = true If true Item output found Item not found Location = index No Yes Yes YesNo No
  • 3.
  • 4.
  • 5.
  • 6. Start Input item searching for Set found to false Set bottom to 0 Set top to (MAX -1) elements While bottom <= top and not found Middle = (bottom + top)/2 If list at middle = item Found = true If list at middle < item Location = middle Bottom = middle + 1 Top = middle - 1 If found = true Output item was not found Output location item found Stop Yes No Yes Yes Yes No Yes No

Editor's Notes

  1. Good layout &amp; easy to follow.No stop function!
  2. Start1Input item searching for 1Set found to falseSet bottom to 0Set top to max-1Cut the top half of the elements