Home /
Expert Answers /
Computer Science /
what-is-the-algorithmic-efficiency-for-each-of-the-following-blocks-of-code-using-big-o-notation-pa677
(Solved):
What is the algorithmic efficiency for each of the following blocks of code using Big-O notation ...
What is the algorithmic efficiency for each of the following blocks of code using Big-O notation? Assume that all variables are properly declared and that all needed libraries have been included. \( O(1) \) - constant or bounded time \( O(n) \) - linear time \( O\left(n^{2}\right) \) - \( \quad \) quadratic time \( O\left(n^{3}\right) \) - cubic time \( O(\log n) \) - logarithmic time \( O\left(2^{n}\right) \) - exponential time
f. \( \{ \) sum=0; \( n=5 ; \) \( k= \) pow \( (2, n) ; \) for \( (i=0 ; i21) \) \( \quad\{ \) for \( (i=0 ; i