search
Log In
0 votes
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)$
in Algorithms
edited by
209 views

3 Answers

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

Related questions

0 votes
2 answers
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
asked Apr 1 in Algorithms Lakshman Patel RJIT 224 views
0 votes
3 answers
2
232 views
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$
asked Apr 1 in Algorithms Lakshman Patel RJIT 232 views
0 votes
1 answer
3
169 views
Which of the following algorithm solve the all-pair shortest path problem? Dijakstra’s algorithm Floyd’s algorithm Prim’s algorithm Warshall’s algorithm
asked Apr 1 in Algorithms Lakshman Patel RJIT 169 views
0 votes
1 answer
4
...