Solved

Suppose Sa Is a Sorted Array of Integer Values,and We

Question 41

Essay

Suppose sa is a sorted array of integer values,and we wish to search for a number target in this array.If sa contains n elements,and we use the binary search strategy,what is the approximate maximum number of comparisons necessary to determine that the value target is or is not in the array? How would your answer change if the array were not sorted?

Correct Answer:

verifed

Verified

log2 n.But for an uns...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions