Which of the following algorithms has the least efficient big O complexity?
\(10000(n^3 + n^2)\)
Incorrect, even though \(n^3\) 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.
\(45 n^3 + 1710 n^2 + 16 n + 5\)
Incorrect, even though \(n^3\) 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.
\((n^3 + n) (n^2 + 1)\)
Correct!
A and B would be equally efficient/inefficient
Look closer, the efficiencies would be different
Checkpoint2.10.2.
Drag the order of growth rates to their rankings from lowest to highest (the slowest i.e. the highest growth rate should be #1)
Compare the functions at different values to see how they compare
\(2^n\)
1st
\(n^2\)
2nd
\(n \log n\)
3rd
\(\log n\)
4th
Checkpoint2.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.
Checkpoint2.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.