If you have an array of 100 sorted elements, and you search for a value that does not exist in the array using a binary search, approximately how many comparisons will have to be done?

a) 7
b) 100
c) 50

7

Computer Science & Information Technology

You might also like to view...

In Amazon CloudWatch, which metric should I be checking to ensure that your DB Instance has enough free storage space?

A. FreeStorage B. FreeStorageVolume C. FreeStorageSpace D. FreeStorageAllocation

Computer Science & Information Technology

A binary tree with height 1 must have

A) exactly two nodes B) two or three nodes C) exactly three nodes D) one or two nodes

Computer Science & Information Technology