Question: Give the smallest big-O estimate for the number of additions used in this algorithm: specialNumber := 0 for i := 1 to n specialNumber
Give the smallest big-O estimate for the number of additions used in this algorithm: specialNumber := 0 for i := 1 to n specialNumber += i end j := 1 while j < 2n magicSum += j j += 2 end
Step by Step Solution
There are 3 Steps involved in it
Solution is Here the two loo... View full answer
Get step-by-step solutions from verified subject matter experts
