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
In the well-known ____________________ attack, an attacker monitors (or sniffs) packets from the network, modifies them, and ins
Oduvanchick [21]

Answer:

MAN IN THE MIDDLE

Explanation:

Man in the middle attack is an attack where the attacker secretly relays and possibly alters the communications between two parties. When data is sent between a computer and a server, a cybercriminal can get in between and spy or eavesdrop.

A man in the middle attack can positions himself in a conversation between a user and an application in other to impersonate one of the parties, making it appear as if a normal exchange of information is underway.

In a man-in-the-middle cyber-attack, the attacker places themselves in between two devices and monitor packets from the network, modifies them, and inserts them back into the network without the other parties knowing.

3 0
3 years ago
How do i use a computer (i'm 99999 years old)
AlekseyPX

Answer:

grandma?

Explanation:

is it you?

6 0
3 years ago
Read 2 more answers
What are some things you can do with labels in Word? Check all that apply. make them include audio print them on the inside of t
____ [38]

Answer:

word does  not support audio, so its not A, but you can customize them, so its probably C

Explanation:

7 0
3 years ago
What class of attacks use innovative attack tools and once a system is infected it silently extracts data over an extended perio
KatRina [158]

Answer:

Advanced persistent threat.

Explanation:

Advanced persistent threat is a threat actor implemented by either a government supported or private group to intrude a network or system and stays undetected, collecting information over a period of time.

It is used by cyber terrorist group to facilitate massive attacks based on the information retrieved. National or government group use the concept to promote national security.

7 0
2 years ago
Which consol was dominant in the US market between 1993 and 1998
Illusion [34]

i believe the Nintendo 64

8 0
3 years ago
Other questions:
  • Cuales son los accesorios electronicos mas recomendados?
    6·1 answer
  • What operating system type uses icons to represent programs
    9·2 answers
  • How are modern computers different from eniac?
    5·1 answer
  • Please tell me what is basic HTML tags and its function please ​
    8·1 answer
  • What does remedy mean
    7·2 answers
  • What are some options available in the Spelling and Grammar Checker? Check all that apply. Change and Change All Redo and Repeat
    15·2 answers
  • Determine whether the phrase below is a sentence or a fragment.
    12·1 answer
  • Someone talk to me please........
    5·2 answers
  • Your welcome 95 points gg
    10·2 answers
  • What science category includes physics and biology?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!