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
First person to answer gets free brainlist
andrew11 [14]

Answer:

TYSM!!!

Explanation:

4 0
3 years ago
Read 2 more answers
Which option allows you to customize the order of your data ?
Vladimir [108]

✧・゚: *✧・゚:*    *:・゚✧*:・゚✧

                  Hello!

✧・゚: *✧・゚:*    *:・゚✧*:・゚✧

❖ The correct answer choice is B) sorting. When you sort, you can order your sheet however you'd like.

~ ʜᴏᴘᴇ ᴛʜɪꜱ ʜᴇʟᴘꜱ! :) ♡

~ ᴄʟᴏᴜᴛᴀɴꜱᴡᴇʀꜱ

8 0
3 years ago
Read 2 more answers
What year did polaroid introduce one-step photography with the SX-70
blagie [28]

Answer:

I first saw the Polaroid SX-70—the one-step instant camera introduced in 1972 by the company's co-founder, Dr.

Explanation:

5 0
2 years ago
Http://moomoo.io/?server=8:16:0
love history [14]

Explanation:

noooooooooooooooooooooooooooooooooo

5 0
3 years ago
Read 2 more answers
________is one of the most popular payment gateways founded in in December 1998​
iren2701 [21]

paypel is the most popular

6 0
3 years ago
Other questions:
  • In order to be compliant with the NIST publications, policies must include key security control requirements. One of these key r
    10·1 answer
  • ________ are devices used to send data between two networks.
    11·1 answer
  • Determine the number of bytes necessary to store an uncompressed RGB color image of size 640 × 480 pixels using 8, 10, 12 and 14
    11·1 answer
  • Works in the public domain have copyright that are expired or abandoned true or false
    5·1 answer
  • Two technicians are discussing shielded cable. Technician A says that shielded wires are generally twisted in pairs to cancel th
    14·1 answer
  • What is the name of the process that weighs the alternatives, gathers all necessary information, and can ultimately lead you to
    9·2 answers
  • Imagine that you have access to a class named MyCircle that has void setRadius(double r) and double getRadius() methods. Write a
    14·1 answer
  • In online education is intrinsically related to equity. Professionalism Communication Accessibility
    8·2 answers
  • List and describe each of the activities of technology
    11·1 answer
  • How do people and computers approach problems differently
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!