Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
3rd Edition
ISBN: 9780134038179
Author: Tony Gaddis, Godfrey Muganda
Publisher: PEARSON
Question
Book Icon
Chapter 17, Problem 4SA
Program Plan Intro

Binary search:

This is the process which uses divide and conquer strategy to find the specific element of an array.

  • The searching process starts from middle element of the array. If the searching element is less than the middle element then it eliminates the second half of the array and it continues searching with the first half of the array.
  • It takes less time to search specific element in an array.

Blurred answer
Students have asked these similar questions
what is the maximum number of comparisons that a Binary Search function will make when searching for a value in a 100-element array?
If a sequential search method is searching for a value that is stored in the last element of a 10,000-element array, how many elements will the search code have to read to locate the value?
The complexity of an Array’s  __str_() method is O(n).   Question 15 options:   False   True

Chapter 17 Solutions

Starting Out with Java: From Control Structures through Data Structures (3rd Edition)

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage