1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Crank
3 years ago
14

A binary search algorithm is written (as in the modules, for example) which searches a pre-sorted array for some user-defined va

lue, clientData. If clientData is stored in the array, it returns its array position, and if not found, it returns -1 (again, just like in the modules). Assume the array to be searched has 100 data elements in it. (Check all that apply):[NOTE: due to common off-by-one interpretations when counting such things, if your predicted answer is within one (+1 or -1) of a posted option below, you can assume your prediction and the choice you are looking at are equivalent and check that option.]A. It might return to the client with an answer after only one comparison of data.B. It may require as many as 99 comparisons of data before it returns.C. It will always return with an answer in 7 or fewer comparisons of data.D. It will always return with an answer in 3 or fewer comparisons of data.
Computers and Technology
1 answer:
Mazyrski [523]3 years ago
4 0

Answer:

c) it will always return with an answer of 7 or fewer comparisons of data.

Explanation:

As maximum number of comparison in worst case for sorted binary search is log₂n, here n = 100, so maximum search is at least 6.6 which is approximately 7.

You might be interested in
What is not a safety practice for working near power lines?
Vesna [10]
Because there is a very likely chance you can get electrocuted which could lead to medical treatment or even death. Also if working near trees or polls or anything that is touching a power line may lead to you being electrocuted.
6 0
3 years ago
Which is an example of correct HTML?
liubo4ka [24]

Answer:

An HTML tag is a special word or letter surrounded by angle brackets, &lt​; and >. You use tags to create HTML elements , such as ...

Explanation:

3 0
3 years ago
Which of the following is not a type of computer network?
vagabundo [1.1K]
B. Metropolitan area network
7 0
3 years ago
What are the three different categories of the types of rule ?
slamgirl [31]
Depends on what rules your talking about
3 0
3 years ago
This is your code.
Tju [1.3M]

Answer:

dog

Explanation:

Given the code :

>>> A = [21, 'dog', 'red']

>>> B = [35, 'cat', 'blue')

>>> C = [12, 'fish', 'green']

>>> E = [A, B, C]

the value of E[0][1]

Here, square boxes is used to select the value at E[0] ; the output is then used to select the value at index 1 of E[0] output.

Note that, indexing starts at 0; hence first list element is 0, then, 1, 2, and so on.

At

E[0] ; list E, index 0 (first element in the list) , gives an output A

Then, A[1] ; list A, index 1 (second element in the list) gives 'dog'

4 0
3 years ago
Other questions:
  • Consider the cement used for the foundation; the bricks and timber used for the walls; and the shingles used for the roof. All o
    5·1 answer
  • Cognitive psychology is the scientific study of what
    9·1 answer
  • Which tab do you select to change how you see your Word document on screen?
    9·2 answers
  • The biggest limitation of a network operating system (NOS) is _____ in terms of memory, process, device, and file management.
    7·1 answer
  • 4.12 LAB: Using math methods Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to
    10·1 answer
  • CS160 Computer Science I In class Lab 10
    15·1 answer
  • I need the solution to this task please anyone
    14·1 answer
  • QUESTION 1
    6·1 answer
  • How can structure of a table change in sql. What general types of changes are possible
    8·1 answer
  • I am a new linux and unix system user. how do i find out the user and groups names and numeric ids of the current user or any us
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!