in what situation can we use binary search? choice 1 of 6:when the array is sorted and the target is in the array choice 2 of 6:when the array is sorted and the target is not in the array choice 3 of 6:when the array is not sorted and the target is in the array choice 4 of 6:when the array is not sorted and the target is not in the array

Respuesta :

When the array is sorted and the target is in the array choice, choose option 1 out of 6. Many people have used binary searches unknowingly since their early years.

Describe binary search using an example.

Finding an element's location in a sorted array can be done using the searching method known as binary search. In this method.

What makes it a binary search?

A "divide and conquer" approach known as binary search necessitates sorting the starting array first. Because the technique divides the array into two equal halves, it is called a binary algorithm. A binary search will initially examine the middle item in the array and evaluate it in relation to the search terms.

Learn more about hyperlink here:

https://brainly.com/question/13344003

#SPJ4

ACCESS MORE