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
Nikolay [14]
3 years ago
13

What is the f(n) runtime of the following pseudocode: sum-0 for A = N/2 downto 1 for B-1 t increment sum by B Explain: exactly w

hat is wrong with the following diagram why it is incorrect how to fix it NP NP- Complete
Computers and Technology
1 answer:
Romashka [77]3 years ago
3 0

The diagram part of the question is incomplete but the mathematical part has been solved below for you . However when the diagram will be attached it will be answered too.

Answer:

Following is the solution for the Time complexity/ Run Time:

Given that:

A = N/2 to 1

B = 1 to 4N

By summation:

Time Complexity = Lower bound of A * Upper Bound of B

Time Complexity = (N/2) * (4N)

By simplifying:

Time Complexity = N * 2N

Time Complexity = 2N^2

Hence the runtime f(n) for given pseudocode will be 2N^2

i hope it will help you!

You might be interested in
Why should you try out a camera bag before taking it on a vacation?
Triss [41]

Answer:

b or c

Explanation:

4 0
3 years ago
Read 2 more answers
Which of the following scenarios demonstrates leadership?
bulgar [2K]
I can’t see the scenarios bro
8 0
3 years ago
Read 2 more answers
Why coaxil cable called coxial cable ?
Reika [66]

Answer: Coaxial Cable has got two physical channel layer in same axis of the cable that is why it is known as "coaxial cable".

Explanation: Coaxial cable is the main example for television cable and telephone cable that have two physical layer of channels and are separated by a insulating material layer and the outer layer working a ground section.The axis of both the physical layer are present on the same axis of the cable and thus is known as coaxial cable. They cable is usually made up of copper and some other materials.

7 0
3 years ago
Read 2 more answers
Can i have two e-mail accounts on my android
Scrat [10]
Yes, if you download an app such as gmail or yahoo mail. hope this answered your question.
5 0
3 years ago
Abrupt changes in road surface or the shape of the road may indicate
Zanzabum

Answer:

D. a potential hazard

Explanation:

Abrupt changes in road surface or the shape of the road may indicate a potential hazard.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Java - Given a String variable response that has already been declared, write some code that repeatedly reads a value from stand
    12·1 answer
  • Adam discovers a virus on his system that is using encryption to modify itself. the virus escapes detection by signature-based a
    14·1 answer
  • Enhancing and optimizing customer retention and loyalty is a major business strategy.
    15·1 answer
  • Mohammed's parents learn that his classmates have
    7·2 answers
  • In order to do a binary search on an array Group of answer choices you must first do a sequential search to be sure the element
    5·1 answer
  • Ashley works for a company that helps hospitals hire new doctors. They have written a list of strategies that can be used to int
    12·1 answer
  • What is the first things u do upon seeing this sheet?​
    14·2 answers
  • Arrange these steps of creating a presentation in the correct order. (notice that the given order is incorrect other than the ba
    13·1 answer
  • The objective fuction of linear progrmming should be
    10·1 answer
  • Ethics related to all <br> artificial intelligence?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!