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
kykrilka [37]
3 years ago
13

From the binary search algorithm, it follows that every iteration of the while loop cuts the size of the search list by half.

Computers and Technology
1 answer:
Colt1911 [192]3 years ago
6 0

Answer:

True: In binary search algorithm, we follow the below steps sequentially:

Input: A sorted array  B[1,2,...n] of n items and one item x to be searched.

Output: The index of x in B if exists in B, 0 otherwise.

  1. low=1
  2. high=n
  3. while( low < high )
  4.  {      mid=low + (high-low)/2
  5.         if( B[mid]==x)
  6.          {
  7.             return(mid)  //returns mid as the index of x
  8.           }
  9.          else
  10.          {
  11.              if( B[mid] < x)      //takes only right half of the array
  12.               {
  13.                 low=mid+1
  14.               }
  15.              else               // takes only the left half of the array
  16.               {
  17.                high=mid-1
  18.               }
  19.           }
  20.  }
  21. return( 0 )

Explanation:

For each iteration the line number 11 or line number 15 will be executed.

Both lines, cut the array size to half of it and takes as the input for next iteration.

You might be interested in
JavaScript uses which property to change the current content of HTML elements?
solong [7]

Answer:

innerHTML

Explanation:

3 0
3 years ago
When I use
slega [8]

Answer:

If it works then no, if it doesn't then yes

Explanation:

Code Academy probably runs either way because it is not taking this as a intense class.

5 0
3 years ago
What is the Multiple Items tool?
Dmitry_Shevchenko [17]

Explanation:

when a form is created in Microsoft Access using the form tool it displays a single record at a time.To display multiple records and the form should be more customizable then in this case we use Multiple Items tool.

Creating a form using Multiple Items Tool:-

In navigation pane click query or table which contains the data that we want to see on the form.

On create tab,in the group Forms,click more Forms,then click Multiple Items.

6 0
2 years ago
What is the term for the era created by the digital revolution?
Ahat [919]
Technological innovation
8 0
3 years ago
Describe Atari and explain how the level of technology available at the time impacted the development of Atari game systems
Gelneren [198K]

Answer:

Atari is something that is dangerous .

has led to many bad things to the young ones

4 0
2 years ago
Other questions:
  • Consider the following classes: public class A { private int myNum; public A(int x) { myNum = x; } public int getNumber() { retu
    11·1 answer
  • Complete the following method named replaceEvens that receives the parameter numbers which is an array of integers. The method m
    5·1 answer
  • Write a statement that adds 1 to the variable reverseDrivers if the variable speed is less than 0,adds 1 to the variable parkedD
    14·1 answer
  • A location in memory used for storing data and given a name in a computer program is called a because the data in the location c
    14·1 answer
  • Which command is not one of the available Change Case options?
    11·1 answer
  • George is sketching a wireframe representation of the home page of his website. What aspect of the home page would be impossible
    11·1 answer
  • Plato Web Tech B Semester Test- I'll mark brainiest for answers to ALL
    9·1 answer
  • MULTIPLE CHOICE:
    15·1 answer
  • Label provides the code that executes if no case label is matched ​
    6·1 answer
  • Write a program that uses a dictionary to store students birthdays. Your program should ask the user what their name is, and loo
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!