Question: 6 . Big - O - ver it [ 1 2 points ] Give the tightest big - O estimate in simplest form for each
BigOver it points
Give the tightest bigO estimate in simplest form for each of these functions and algorithms.
Show your steps to arrive at the final expression, and explain your answer.
a f nnnn nnn nn nn
b gnlog n nn n
c function sumOddIndicesa aN in R
i
s
while i N do
s s ai
i i
end while
return s
end function
d function findMinPowerAboveNN in Z
i
while i N do
i i
end while
return i
end function
e function findMaxDifferencea aN in R
d
for i : to N do
for j : to N do
if ai aj d then
d ai aj
end if
end for
end for
return d
end function
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
