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
The weakest hydrogen line stars are classified as:
Ostrovityanka [42]
O is the weakest hydrogen line
7 0
4 years ago
Read 2 more answers
When defining an array of class objects, how do you pass arguments to the constructor for each object in the array?
Nuetrik [128]
Basically, the array[ index ] is the name of the object so when you  populate the array you'd have statement[s] like:

array[ index ] = new ClassName( arg0, arg1, arg2 );
8 0
3 years ago
What types of activities are ideal for a robot to perform?
LUCKY_DIMON [66]

The type of activities that are ideal for a robot to perform are; Repetitive tasks

Robots are machines that are programmable by a computer which have the capacity of automatically carrying out a complex series of actions.

Now, robots are used in a wide array of industries which include manufacturing, assembly and packaging, transport, earth and space exploration, e.t.c.

The most common use are found primarily in the automobile industry where they are used to carry out repetitive tasks and those that are difficult or hazardous for humans.

Read more about robots at; brainly.com/question/9145476

3 0
3 years ago
What does the statement that follows do? double gallons[6] = { 12.75, 14.87 }; a. It assigns the two values in the initializatio
Serhud [2]

Answer:

It assigns the two values in the initialization list to the first two elements and default values to the other elements.

Explanation:

Given

The array initialization

Required

Interpret the statement

double gallons[6] implies that the length/size of the array gallons is 6.

In other words, the array will hold 6 elements

{12.75, 14.87} implies that only the first two elements of the array are initialized ; the remain 4 elements will be set to default 0.

3 0
3 years ago
Select the correct answers
Mashutka [201]

Answer:

Use a mixture of External and Internal Links....

Explanation:

8 0
3 years ago
Other questions:
  • The Tell Me feature also includes access to the _____ feature.
    13·1 answer
  • Given positive integer num_insects, write a while loop that prints that number doubled up to, but without exceeding 100. Follow
    8·1 answer
  • One of the most toxic components of a computer is the
    11·1 answer
  • COMPUTER FUNDIMENTAL HELP 15 POINTS!! RESEND IT
    7·2 answers
  • A security analyst is investigating a call from a user regarding one of the websites receiving a 503: Service unavailable error.
    10·1 answer
  • 1) Open the file DiceSimulation.java attached below. Create a new project on NetBeans called DiceSimulation. Copy the code from
    13·1 answer
  • 30 pts!<br> Explain how Moore's law presumes everyone will have access to the Internet.
    14·1 answer
  • What does error code 18 indicate?
    11·1 answer
  • Write a function named partfthat takes inas parameterstwo parallel lists: a list of times (in increasing order), and a list of d
    7·1 answer
  • If you are going to build a custom fast PC for gaming and you need a lot of storage for big video files and videos, but you have
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!