Skip to main content

Section 2.10 Self Check

Checkpoint 2.10.1.

Which of the following algorithms has the least efficient big O complexity?
  • 10000(n3+n2)
  • Incorrect, even though n3 is the most significant part for all of these formulas, the way it interacts with the rest of the equation is also important to note.
  • 45n3+1710n2+16n+5
  • Incorrect, even though n3 is the most significant part for all of these formulas, the way it interacts with the rest of the equation is also important to note.
  • (n3+n)(n2+1)
  • Correct!
  • A and B would be equally efficient/inefficient
  • Look closer, the efficiencies would be different

Checkpoint 2.10.2.

Checkpoint 2.10.3.

When considering computer resources, what factors do we have in mind? Select all that apply.
  • language constraints
  • No, we do not consider the restraints of a language when thinking about how efficient an algorithm is.
  • Space
  • Yes, we consider how much space we need to solve a problem.
  • Time
  • Yes, we consider how much time it takes to solve a problem
  • Energy
  • No, we do not consider how much energy it takes at this point.

Checkpoint 2.10.4.

When considering the Big O of an algorithm, what do we use to quantify our description of an algorithm.
  • the space it takes
  • This can be dependent of the programming language
  • the time it takes
  • This can be dependent on the machine, programming language, and other factors
  • the number of steps
  • Yes, when quantifying the time it takes to execute an algorithm we base it on the number of steps it takes to solve the problem, not the time it takes
  • the readability of the code
  • No, a very efficient algorithm can be programmed efficiently in C++ without any extra spaces making it unreadable, however the solution would still be efficient.
You have attempted 1 of 3 activities on this page.