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
P16 Consider the following network. ISP B provides national backbone service to regional ISP A. ISP C provides national backbone
Art [367]

Solution :

Considering the following data :

$\text{ISP B}$ provides the national backbone to the regional $\text{ISP A}$.

$\text{ISP C}$ provides the national backbone to the regional $\text{ISP D}$.

Each of the ISP consists of one autonomous systems (AS).

$\text{ISP B}$ would like to hand over the traffic of C through the $\text{West}$ Coast.

The $\text{ISP C}$ would like to receive traffic from B's peering point via East Coast.

One way for $C$ to force $B$ to hand over all of $B$’s traffic to $D$ on the east coast is for $C$ to  only advertise its route to $D$ via its east coast peering point with $C$.

7 0
2 years ago
What are impacts of ict in every day your life?describe if prifely​
telo118 [61]

Answer:

ICT is a broad subject and a concept of evolving.It covers any product that will store, retrieve, manipulate, transmit, or receive information electronically in a digital form.

Explanation:

HOW WE USE ICT IN OUR DAILY LIFE

COMMUNICATION

JOB OPPORTUNITIES

EDUCATION

SOCIALIZING

POSITIVE IMPACT OF ICT IN OUR DAILY LIFE

1.Easy to access information:

I use ICT to access more information that I need for everyday schooling.Because Internet has more faster than searching to a school library. Even the deadline of my research is coming, I can make it fast with the help of ICT

2. Education: distance learning and on-line tutorials. New ways of learning, e.g. interactive multi-media and virtual reality.

3.Free access of sharing like photo,video,and message

5 0
2 years ago
A computer user who purchases a software package that will not operate on his or her hardware configuration is a victim of which
Natalija [7]
Is this a math problem? I don't get what you are trying to say sorry
5 0
3 years ago
Happy Valentine's day!!
Lorico [155]
Happy valentine’s u too !!
7 0
2 years ago
Suppose we are sorting an array of nine integers using heapsort, and we have just finished one of the reheapifications downward.
Ilia_Sergeevich [38]

Answer:

3

Explanation:

Heap sort pick an item from the first or last position in an array and compares it with other items in other positions in the array, swapping position if they meet the condition.

The array above has three maximum items arranged sequentially in the array, this is prove that there have been 3 reheapifications in the array.

7 0
3 years ago
Other questions:
  • What do you observe on the filter paper strip after 2 to 3 hours?
    8·2 answers
  • Create a simple main() that solves the subset sum problem for any vector of ints. Here is an example of the set-up and output. Y
    12·1 answer
  • Do you think social media should affect presidential elections
    6·2 answers
  • The software used to help run the computer hardware is the _____.
    9·2 answers
  • What part of the network is the point where the responsibility of the administrator ends and the telecommunications providers re
    5·1 answer
  • What is an advantage and disadvantage to file compression
    8·1 answer
  • Write a program that accepts two numbers R and H, from Command Argument List (feed to the main method). R is the radius of the w
    11·1 answer
  • Where would you go to access frequently used icons?
    12·2 answers
  • GIVING OUT BRAINLIEST AND I AM ALSO WARNING EVERYONE TO NOT ANSWER A BUNCH OF rubbish just to get the points!
    7·2 answers
  • Please help me.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!