1) The set of the algorithms whose order is O (1) would run in the identical time. True/False
2) Determine the complexity of the following program into big O notation:
for(int i = 1 ; i <= max ; i + +)
for(int j = 1 ; j <= max ; j + +) cout << (i * j) << " " ; cout << endl ;
3) Assume the following program segment:
for (i = 1; i <= n; i *= 2)
j = 1;
Find out running time of the above program segment into big O notation?
4) Prove that if f(n) = n2 + 2n + 5 and g(n) = n2 then f(n) = O (g(n)).
5) How several times does the given for loop will run
for (i=1; i<= n; i*2)
k = k + 1;