1P

The time complexity represents the amount of time required by the algorithm to determine the output. The time complexity also varies with the length of the input. As the length of input increases, it’s time complexity also increases.

The values to calculate the time are considered as follows:

Consider function (logarithm with base 2 is considered), now determine largest value of n that can be calculated in 1 sec (or).

Therefore, the largest value n that can be calculated in 1 sec for function is.


Now, again consider function determine largest value of n that can be calculated in 1 minute (or).

Therefore, the largest value n that can be calculated in 1 minute for function is.


Determine largest value of n that calculated in 1 hour (or).

Therefore, the largest value n that can be calculated in 1 hour for function is.


Determine largest value of n that calculated in 1 day (or).

Therefore, the largest value n that can be calculated in 1 day for function is.

Similarly, calculate the largest value n that can be calculated in 1 month, 1 year and 1 century for function are,and .


Consider function, now determine largest value of n that can be calculated in 1 sec (or).

Therefore, the largest value n that can be calculated in 1 sec for function is.


Similarly, calculating the largest value n for different function in different time interval:

Chegg Rip, Introduction to Algorithms, 3rd Edition. [RipVer 0.1] (index)