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 8 hours, 5 minutes, 22 seconds minus (-) 7 hours, 24 minutes, 37 seconds?
olga_2 [115]

Answer:

Enter time 1 HH:MM:SS8:5:22                                                                                                    

Enter time 2 HH:MM:SS7:24:37                                                                                                  

0:40:45

Explanation:

The program for above in Python is:

from datetime import datetime

s1 = input("Enter time 1 HH:MM:SS")

s2 = input("Enter time 2 HH:MM:SS")

Format1 = '%H:%M:%S'

tdiff = datetime.strptime(s1, Format1) - datetime.strptime(s2, Format1)

print(tdiff)

We are using the datetime class in datetime module for using strptime to find the difference between the two times.

3 0
3 years ago
What is the left are if a slide in a presentation called
defon

Answer:

A slide pane

Explanation:

a feature available in some programs, usually found on the left side of the window.

8 0
3 years ago
graphic designers can compress files in different formats . One of the formats ensures that the quality and details of the image
musickatia [10]

Answer:

The format that is used is: PNG

Explanation:

7 0
3 years ago
Write a procedural programming loop.. Your loop should start variable n with a value of 10 and count down to zero. The loop shou
anastassius [24]

Answer:

//Here is the for loop in C.

for(n=10;n>0;n--)

{

   printf("count =%d \n",n);

}

Explanation:

Since C is a procedural programming language.Here if a loop that starts with n=10; It will run till n becomes 0. When n reaches to 0 then loop terminates otherwise it  print the count of n.

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{  // variables

int n;

// for loop that runs 10 times

// when n==0 then loop terminates

for(n=10;n>0;n--)

{

   cout<<"count ="<<n<<endl;

}

return 0;

}

Output:

count =10

count =9

count =8

count =7

count =6

count =5

count =4

count =3

count =2

count =1

3 0
3 years ago
Permission must be sought in order to use a play that is in the public domain. True or False?
sertanlavr [38]

Answer:

False

Explanation:

Permission can't be sought in order to use a play that is in the public domain.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Describe the Say It, Cover It, Resay It method.
    14·2 answers
  • Fatal error: Class 'Drush\Commands\DrushCommands' not found in /Users/amy/testsite/Sites/acquia dev desktop/fresh-install/module
    7·1 answer
  • I have a question. This question will probably be deleted, but why do moderators keep deleting my answers when they are legitima
    13·1 answer
  • Which graph is the solution to the system 2x – 3 and y &lt; 2x + 4?
    5·2 answers
  • 4.2 lesson practice last one plzs help
    5·2 answers
  • 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
  • You are considering using Wi-Fi triangulation to track the location of wireless devices within your organization. However, you h
    9·1 answer
  • Which user interface part shows graphical output of mined data?
    8·2 answers
  • Binary subtraction<br> Subtract (111) from (1000)
    8·1 answer
  • a radio frequency identification (rfid) tag provides a generic identification for a credit or debit card carrying the tag.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!