Wednesday, December 3, 2014

Week 9

In this week, the 3 while loops would have had me initially guessing O(n^3). However, when we looked closer, the loop guards were much smaller than n. But then again, we have to multiply the 3 1/3n rather than adding the 3 1/3n to sum to n of power 1. So initially, I was right, but the picture showing i,j and k split along n made me thing that it was O(n) but I was correct in my first naive approach. Disproving or proving it is not an element is pretty textbook here too. Just use negation and prove that.

No comments:

Post a Comment