Solved

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

Question 57

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents