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
Edhesive 4.2 question 2 answers
Citrus2011 [14]

Answer:

total=0

pet=input("what pet do you have? ")

while pet!= "rock":

   total=total+1

   print("you have a "+pet+" with a total of "+ str(total)+ " pet(s)")

   pet=input("What pet do you have? ")

Explanation: Just copy and paste above again just copy and paste this will get you a 100 percent i made another account just to give yall edhesive answers if yall need help with any edhesive just comment below

7 0
3 years ago
Select all that apply.
Ierofanga [76]
Insert option the last one
3 0
3 years ago
Read 2 more answers
What are the unique technology that characterised each generation of computer ​
Svetach [21]

Technology used: Transistor. Operating speed was in terms of a microsecond. Assembly language and machines independent language such as COBOL (Common Business Oriented Language) and FORTRAN (Formula Translation) were introduced the size of the computer. Magnetic core memory was used as primary memory.

7 0
3 years ago
What is computer hardware?
faltersainse [42]
Computer hard ware is any thing physical that you can touch such as the mouse , keyboard hard drive cpu, moniter or if your using a laptop it will be the entire computer its self.
5 0
4 years ago
Read 2 more answers
How many digits are in the binary number system? Explain why.
Katen [24]

Answer:

Since there are only two digits in binary, there are only two possible outcomes of each partial multiplication: If the digit in B is 0, the partial product is also 0. If the digit in B is 1, the partial product is equal to A.

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which command group does a user need to access the Formula dialog box?
    11·1 answer
  • What does a capitalist economy allow people to do?
    11·2 answers
  • To use a jQuery UI widget, you must code two things in the way that’s prescribed for the widget. What are they?
    5·1 answer
  • A(n) ___________ operating system provides process and memory management services that allow two or more tasks, jobs, or program
    6·1 answer
  • Write a Python program that asks the user for a positive, odd value. Once the value is validated determine if the number is Prim
    11·1 answer
  • What are the primary IP addresses for DNS servers hosted on the x128bit, iskytap and cloudparadox domains
    8·1 answer
  • What happens if you try to compile and run this program?
    14·1 answer
  • Follow me please.........​
    14·1 answer
  • How many tables are needed to implement an REA data model that has five distinct entity-sets, two many-to-many relationships and
    6·1 answer
  • Does anyone know how to by pass this pls help?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!