# NIELIT 2017 OCT Scientific Assistant A (CS) - Section B: 30

209 views

An algorithm is made up of two modules $M1$ and $M2.$ If order of $M1$ is $f(n)$ and $M2$ is $g(n)$ then he order of algorithm is

1. $max(f(n),g(n))$
2. $min(f(n),g(n))$
3. $f(n) + g(n)$
4. $f(n) \times g(n)$

edited

option A) max(f(n),g(n)) is the answer.
A – SHOULD BE THE ANSWER.

## Related questions

1
224 views
Consider the following C code segment: int Ls Prime(n) { int i,n; for(i=2;i<=sqrt(n);i++) if(n%i ==0) { printf( NOT Prime.\n ); return 0; } return 1; } Let $T(n)$ denote the number of times the for loop is executed by the program on input $n.$ ... $T(n) = O(\sqrt{n})$ and $T(n) = \Omega (1)$ $T(n) = O(n)$ and $T(n) = \Omega (\sqrt{n})$ None of these
The running time of an algorithm $T(n),$ where $’n’$ is the input size , is given by $T(n) = 8T(n/2) + qn,$ if $n>1$ $= p,$ if $n = 1$ Where $p,q$ are constants. The order of this algorithm is $n^{2}$ $n^{n}$ $n^{3}$ $n$
A decimal has $25$ digits. The number of bits needed for its equivalent binary representation is approximately, $50$ $74$ $40$ $60$