Home
Add Document
Sign In
Create An Account
Binary Search
Download PDF
Comment
Report
2 Downloads
89 Views
Term 2
Lesson 17
Binary Search
AP Computer Science - Unit Seven
Binary Search
Rule The array must be sorted for this algorithm to work
AP Computer Science - Unit Seven
Binary Search
Steps: Find the middle of the set (low + high)/2 Is this the value? Too low? high = mid-1 Too high? low = mid+1 Repeat until _________ or _________
AP Computer Science - Unit Seven
Binary Search
Repetition Iterative – use a loop Recursive – method calls itself
AP Computer Science - Unit Seven
Binary Search
Advantages: Very fast
Disadvantages: More difficult to code Array must be sorted
AP Computer Science - Unit Seven
Recommend Documents
Compressive Binary Search
×
Report Binary Search
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
×
Sign In
Email
Password
Remember me
Forgot password?
Sign In
Login with Facebook
Our partners will collect data and use cookies for ad personalization and measurement.
Learn how we and our ad partner Google, collect and use data
.
Agree & Close