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
GoInternet, Inc., is an Internet-access service provider that is being forced to manage numerous unwanted e-mail messages from a
marissa [1.9K]

Answer:

The correct answer to the following question is option b.)sends messages involving products of companies previously sued under the CAN-SPAM Act.

Explanation:

This act is an act of Controlling the Assault of Non-Solicited Marketing And Other things.

It is the law that establish the rules for the commercial message and the commercial e-mails, gives recipients right to have the business stops emailing them, and they outline the penalties incurred for those person who has violated the law.

8 0
3 years ago
A common and extremely useful feature of most online dictionaries is
choli [55]
A common and extremely useful feature of most online dictionaries is <em />interoperable browser.
4 0
3 years ago
g What differences do you anticipate there being between working inside vs outside City government in data and digital services?
Ivanshal [37]

Answer:

The work with city government is better than outside city government due to the reasons given below.

Explanation:

There are many differences while working in city government or outside city government. I choose city government job in data and digital service due to the following reasons.

  1. City government provides all types of facilities that are required in data management and digital services.
  2. Provision of more benefits along with salary from city government.
  3. City government arrange different training and development sessions for their employ.
  4. There are many learning and development opportunities, because they provide opportunity to work in different departments.  
  5. City Government have better HR policies as compared to outside government.
6 0
3 years ago
2. In many jurisdictions a small deposit is added to containers to encourage people to recycle them. In one particular jurisdict
RUDIKE [14]

Answer:

Here is the Python program:

small_container = int(input("Enter the number of small containers you recycled?"))

large_container = int(input("Enter the number of large containers you recycled?"))

refund = (small_container * 0.10) + (large_container * 0.25)

print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund)))

Explanation:

The program first prompts the user to enter the number of small containers. The input value is stored in an integer type variable small_container. The input is basically an integer value.

The program then prompts the user to enter the number of large containers. The input value is stored in an integer type variable large_container. The input is basically an integer value.

refund = (small_container * 0.10) + (large_container * 0.25)  This statement computers the refund that will be recieved for returning the small and larger containers. The small containers holding one litre or less have a $0.10 deposit so the number of small containers is multiplied by 0.10. The large containers holding more than one litre have a $0.25 deposit so the number of large containers is multiplied by 0.25. Now both of these calculated deposits of containers of each side are added to return the refund that will be received for returning these containers. This whole computation is stored in refund variable.

print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund))) This print statement displays the refund in the format given in the question. The output includes a $ sign and displays exactly two decimal places by using {0:.2f} where .2f means 2 decimal places after the decimal point. Then the output is represented in floating point number using. format(float) is used to specify the output type as float to display a floating point refund value up to 2 decimal places.

5 0
3 years ago
Briefly describe the role of creativity and innovation to entrepreneurship​
prisoha [69]

Answer:

isia

Explanation:

Apooopooopeeepepe

8 0
2 years ago
Other questions:
  • For an IP or device that is in the local network, it's a very straight forward cache table lookup for its MAC address. How does
    5·1 answer
  • Direct messaging is similar to email, except
    5·2 answers
  • Define a function CoordTransform() that transforms the function's first two input parameters xVal and yVal into two output param
    11·1 answer
  • Households pay taxes to the government and receive public services. Which of the following is a public service?
    8·1 answer
  • Which of the following is something that scientists often seek by using computer models and simulations?
    8·2 answers
  • What are the arguments for writing efficient programs even though hardware is relatively inexpensive?
    10·1 answer
  • What are scape codes and the effectes on out put
    6·1 answer
  • I AM GIVING BRAINLEST!!!!!!!!
    14·2 answers
  • Formatting means ____________
    12·2 answers
  • Years ago when working a helpdesk, the most common question asked, almost daily, was about resetting passwords. What type of kno
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!