Intro to Algorithms (chapter 1-1)
For each time T
, and each function f(n)
, you are required to find the maximal integer n
such that f(n) <= T
For example, f(n) = n^2, T=1Sec = 1000 ms
:
n^2 <= 1000
n <= sqrt(1000)
n <= ~31.63 <- not an integer
n <= 31
Given any function f(n)
, and some time T
, you are required to similarly find the maximal value of n
, and fill in the table.