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
Anika [276]
3 years ago
7

Isabel has an interesting way of summing up the values in a sequence A ofn integers, where n is a power of two. She creates a ne

w sequence B of halfthe size of A and sets B[i] = A[2i]+A[2i+1], for i = 0,1, . . . , (n/2)−1. IfB has size 1, then she outputs B[0]. Otherwise, she replaces A with B, andrepeats the process. What is the running time of her algorithm?
Computers and Technology
1 answer:
olganol [36]3 years ago
6 0

Answer:

Running time of algorithm is O(n).

Explanation:

n is power of 2

n =2,4,8,16,32,...................................

A is an array having n elements

B is an array of size 0 to (n/2)-1

if n=4 B then (4/2)-1 =1 So B has size 2

for(i=0;i<=(n/2)-1;++)

{

B[i]=A[2i]+A[2i+1];

}

This for loop will run n/2 times so complexity in terms of Big Oh is O(n/2) =O(n)

Running time of algorithm is O(n).

You might be interested in
Which of the following best describes information techonolgy (IT)?
Lera25 [3.4K]

Answer:

IT can be purchased; IS cannot be purchased

Explanation:

Yeah

6 0
3 years ago
Sharon wants to name her website sharonworld.com. What should she do next? A. begin searching for images to make her website loo
Goshia [24]

purchase the domain name

3 0
3 years ago
Read 2 more answers
When parallel parking, you should select a space that is __________ as long as your car.
Shtirlitz [24]

that is Equally as long as your car


7 0
3 years ago
A(n) __________ port, also known as a monitoring port, is a specially configured connection on a network device that is capable
drek231 [11]

Answer:

The answer is "SPAN"

Explanation:

The full form of SPAN port is  "Switch Port Analyzer", which is used to designed specifically for the interface on a network device, that would be able to monitor all traffic passing across the entire device.

  • The use of this port will also call the mirror ports, that is a popular way of gathering data traffic for tracking purposes.
  • It is primarily used to access the bus switch and all interfaces, which is usually accessible from data transmission.
7 0
4 years ago
Eniac was the first desktop computer. t/f
LekaFEV [45]

Answer:

The answer is "False".

Explanation:

ENIAC stands for Electronic Numerical Integrator and Computer, It was first developed in 1946. This computer use circuits and node that are interconnected with each other to show the result.

  • ENIAC was a firstly, Reconfigurable vacuum tube, that controls the unit and it doesn't store information
  • It takes a large room to set up the system, that's why it is not true.

6 0
3 years ago
Other questions:
  • What is the simplest way to permanently get rid of an unwanted file? A. Go to the Start menu and then delete the file. B. Erase
    5·1 answer
  • Write a function "nonRepeatings" that takes a string "s3" and returns the non-repeating characters in this string. Sample Input
    11·1 answer
  • A<br> is a reduced-size version of a graphic image used to help recognize and organize pictures.
    5·1 answer
  • In mathematics, the square root of a negative number is not real; in Java therefore, passing such a value to the square root fun
    12·1 answer
  • You need to buy a cable to connect a desktop PC to a router. Which cable should
    13·1 answer
  • What tag is used to contain information about a web page, such as the title and related pages?
    12·1 answer
  • Write a program that declares an array named myArray with 8 components of the type int. Initialize the array to 8 values that th
    6·1 answer
  • Q.No.3 b. (Marks 3)
    5·1 answer
  • When working in outline mode, press __________ and click the eye icon to change only one layer back to preview mode.
    10·1 answer
  • a good way to repeatedly perform an operation is to write the statements for the task once and then place the statements in a lo
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!