The efficiency of the algorithm dolt can be expressed as O(n)=n^3.Calculate the efficiency of the following program segment exactly and by using the big-O notation.
for (i=1; i <= n+1; i++)
for (j=1; j < n; i++)
dolt (...)
The second loop is nested but I'm not sure how to format it on the website.
I'm trying to find out if I'm on the right track. My answer was: $$n\cdot n\cdot (n^3)= n^5 = O(n^5)$$