Determining the order of magnitude

Assignment Help Basic Computer Science
Reference no: EM131499007

What is the order of magnitude of the following code segment? Assummin that the size of input is n (e.g., array of n items) and that the statements inside the innermost loop are independent of n. 

for (int i=1; i<=n; i++)

{

        for (int j=1; j<=20; j++)

        {

                 for(int k=1; k<=5; k++)

                 {

                          //some statements independent of n

                 }

        }

}

a) O(n)

b) O(n^2)

c) O(n^3)

d) O(1)

Reference no: EM131499007

Questions Cloud

Analyze organization to develop change management proposal : Since the health care environment is constantly changing and transforming, the ability to manage and adapt to change is essential in health care organizations.
Find the monetary base : Assume that the required reserve ratio is .05, currency in circulation is 400 billion, checkable deposits are 400 billion, and excess reserves are 60 billion.
Suggest key actions that management should take : Suggest key actions that management should take in order to confront these circumstances. Provide a rationale for your response.
How the organization or individuals responded to that threat : Explain how the organization or individuals responded to that threat. If you do not know for sure, speculate on the response.
Determining the order of magnitude : Assummin that the size of input is n (e.g., array of n items) and that the statements inside the innermost loop are independent of n.
Canadian citizen is moving to mexico : A Canadian citizen is moving to Mexico and is taking C$7, 250 to convert into Mexican pesos. What is the MXP/CS cross rate?
Manage the business requirements for covers books : Create a chart titled ‘Total Investment Values' showing the value of the total investment over 12 months
How biostatistical calculations and methods support article : how key biostatistical calculations and methods support the conclusions in each article. Cite relevant information from the articles that support your answer.
Forensic image of a hard drive while on scene : Collect electronic evidence - list the tools and methods you would use to collect a forensic image of a hard drive while on scene.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the role of the project manager

What other additional information would you like to share with the class?

  How many possible 5-bit sequences are there

How many possible 5-bit sequences are there (used by the existing code or not) that meet the stronger restriction of having at most one leading and at most one trailing 0? Could all 4-bit sequences be mapped to such 5-bit sequences?

  Door lock that implements the rules

Construct a finite-state machine for an electronic door lock that implements the following rules: A user enters a string of three digits, one digit at a time.

  Can we vectorize the computations in get segments ()

Given that we are looping over the number of objects we see, not the 360 range values, does vectorizing significantly improve the performance? Think about how often we call get Segments () - once for each look in each log file.

  Difference between a candidate key and a primary key

What is the best test for determining whether a determinant is unique?

  Write a small program in matlab

Write a small program in MATLAB that evaluates the gradient at each point in a two-dimensional grid in the space -5 ≤ x 1 ≤ 5. Choose an appropriate grid spacing

  What is the smallest processing rate per hour

Poisson distributed, and that the service times are distributed exponentially. The selection committee has been instructed to consider only machines that will yield an average turnaround time (i.e., expected time in the system) of 5 minutes or les..

  Displays the subtotal of the sale

How to get the total purchase of five items with price of each items and then displays the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 6 percent.

  Find an expression for the concentration level

The ventilation system delivers 10 m3 of air per minute to the 1500-m3 room. Find an expression for the concentration level of CO2 in the room.

  Write a program that lists the process id and command name

Make sure your program correctly handles the possibility that a /proc/PID directory disappears between the time that the program determines that the directory exists and the time that it tries to open the corresponding /proc/PID/status file.

  Define the aspects of a swot analysis

Define the aspects of a SWOT analysis and how it can benefit a company.

  Determine the equation of the hyperbola

Place the two ranger stations on the x-axis with the midpoint between the two stations at the origin. The transverse axis is horizontal.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd