Re: Analysis of algorithm

Hey hatol25.

You have the right idea for the first one except that you rounded your answer down. If you re-check your answer with 600*383 you get 229800 which is less than 230000, so you have to round up and add an extra cycle to gaurantee that it will finish in that time (even though it will finish slightly quicker).

For the second one you need to look at the total number of operations in an hour. There are 3600 seconds in an hour (60 seconds per minute and 60 per hour) which means the total number of operations in one hour is 50,000*3,600 = 180,000,000 or 180 million.

So now we have to find a value of n where 23*n^2 = number of operations, but we found this to be 180 million (or 180,000,000). So 23n^2 = 180,000,000. What does this imply about our size n?