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
Pepsi [2]
3 years ago
11

A binary search function is searching for a value that is stored in the middle element of an array. How many times will the func

tion read an element in the array before finding the value?
Computers and Technology
1 answer:
Ganezh [65]3 years ago
3 0

Answer: 1 time.

Explanation:

  • A binary function is also known as a half-interval search is a search algorithm to find the position of a given element x within a well-sorted array [].
  • Binary search compares the target value to the middle element of the array.
  • It ignores half of the elements just after one comparison.
  • it compares x with the middle element.

So, the function read an element <u>one time</u> in the array before finding the value.

You might be interested in
Will give brainliest!<br> Who created binary, and does anyone have any idea how?
Sphinxa [80]

Answer:

Gottfried Leibniz created it and Leibniz was trying to find a system that converts logic's verbal statements into a pure mathematical one.

6 0
2 years ago
How do I mirror cast my smart lg tv?​
lora16 [44]
I really wish I could help you but I don’t know
6 0
3 years ago
Write at least complete set of HTML code to hyperlink to “Home.html”..
faltersainse [42]

Answer:

HTML Link Colors

By default, a link will appear like this (in all browsers):

An unvisited link is underlined and blue

A visited link is underlined and purple

An active link is underlined and red

You can change the link state colors, by using CSS:

8 0
3 years ago
In QBasic, create a number guessing challenge. Your program should generate a random number from 1-
Sergio039 [100]

Answer:

yes

Explanation:

6 0
3 years ago
How do you fix this windows 7 screen​
tensa zangetsu [6.8K]

Try restarting it. If you can’t restart because the screen is frozen maybe just turn it off and back on. If you already tried restarting and it still didn’t fix the problem, just give it some time. The computer will reset itself eventually which should fix the problem.

6 0
3 years ago
Other questions:
  • Which of the following is a useful policy to minimize waste and mistakes?
    6·1 answer
  • The difference between a want and a need is a want is not necessary for survival. Things necessary for survival are known as ___
    6·1 answer
  • The computerization of the layout and paste-up process further complicated printing, as did the digitizing of photographs.
    12·1 answer
  • Please help with the question no. 5 and 7 please help ​
    6·1 answer
  • What is the difference between player-centric game design and designer-centric game design? How does a player-centric game assis
    7·1 answer
  • A different way of pronoucing the same words is called a _____
    15·1 answer
  • Which type of appliance can host several functions, such as antimalware, firewall, content filter, and proxy server
    11·1 answer
  • Resize vector countDown to have newSize elements. Populate the vector with integers {newSize, newSize - 1, ..., 1}. Ex: If newSi
    6·1 answer
  • Which type of mic is durable, versatile and does not rely on power?
    14·2 answers
  • _____ provides the best video resolution. *<br><br> VGA<br> HDMI<br> USB<br> DVI
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!