Data Structures

1:

An algorithm is made up of 2 modules M1&M2. If order of M1 is f(n) & M2 is g(n) then the order of algorithm is?

A.

max (f(n),g(n))

B.

min (f(n),g(n))

C.

f(n) + g(n)

D.

f(n) X g(n)

 

Answer : B

Explanation :

anonymous said: (11:55am on Wednesday 19th February 2014)
If order of M1 if quadratic and M2 is linear, overall order will be quadratic and not linear right? say F(n) = n^2 and g(n) = n, it should be max(n^2, n) = n^2

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.