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
Need help ASAP Examples of utilities that make it possible for people to create and share multimedia files include _____. audio
a_sh-v [17]

Answer:

Prototype

I think this is the word ur looking for!

5 0
3 years ago
Read 2 more answers
Explain how inflation flattens the universe
DIA [1.3K]
They rise to the surface of the earth
8 0
3 years ago
Read 2 more answers
I'm curious why I would need to know this on a school learning site.
zhannawk [14.2K]
no idea either lol, I mean school forces you to learn





..
4 0
3 years ago
Globalization is based on <br>​
Blababa [14]

Answer:

the growing interdependence of the world's economies.

Explanation:

it's of all the cultures and populations that crossed the border by trading

5 0
3 years ago
Write the Flowchart to find Even number between 1 to 50<br>​
ASHA 777 [7]

Answer:

See attachment for flowchart

Explanation:

Required

Flowchart to fine even from 1 to 50

The flowchart has been attached.

The rough algorithm (explanation) of the flowchart is as follows.

1. Start

2. Initialize num to 1

3. Check if num is less than or equal to 50

  3.1 If yes

      3.1.1 Check if num is even

      3.1.1.1 If yes

         3.1.1.2 Print num

  3.1.3 Increase num by 1

 3.2 If num is greater than 50

    3.2.1 Stop

4. Goto 3

4 0
3 years ago
Other questions:
  • For a color display using 8 bits for each of the primary colors (red, green, blue) per pixel, what should be the minimum size in
    6·1 answer
  • How was windows 3 installed on a pc?
    11·1 answer
  • design aDesign a queue abstract data type for float elements in a language that you know, including operations for enqueue, dequ
    10·1 answer
  • What is a benefit of the Name Manager feature?​
    12·2 answers
  • Making sure that your business has something special and distinct to offer is known as?
    12·1 answer
  • The rules of right-of-way<br> Pedestrians, bicyclists, and skateboarders<br> when they use the road.
    12·1 answer
  • A recursive method that computes the number of groups of k out of n things has the precondition that ______. n is a positive num
    12·1 answer
  • With a heat exchanger, the temperature of the process fluid can be measured with a temperature-
    14·1 answer
  • Discuss at least 1 Microsoft Windows security features that could protect data?
    5·1 answer
  • balance exercises used for introducing balance training should initially involve little joint motion and improve what type of co
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!