An algorithm is made up of 2 modules M1 and M2. If time complexity of modules M1 and M2 are h(n) and g(n) respectively, the time complexity of the algorithm is
A. min (h(n),g(n))
B. max (h(n),g(n))
C. h(n) + g(n)
D. h(n) * g(n)
Answer:B
An algorithm is made up of 2 modules M1 and M2. If time complexity of modules M1 and M2 are h(n) and g(n) respectively, the time complexity of the algorithm is
A. min (h(n),g(n)) B. max (h(n),g(n)) C. h(n) + g(n) D. h(n) * g(n)