previous | start | next

Running Time

Suggested steps

  1. Decide on an input model; that is, what will be used as the input size.
  2. Identify the inner loop; that is, the part of the code that will execute most often and/or contribute most to the running time.
  3. Decide on a cost model; that is what operations in the inner loop are to be counted.
  4. Determine the the total count of the operations in the cost model for a given input size.


previous | start | next