Data Structures

1: The order of an algorithm that finds whether a given Boolean function of 'n' variables, produces a 1 is  
A.

constant

B.

 linear

C.

 logarithmic

D.

 exponential

 

Answer : A

Explanation :

Let T(1) = T(2) = T(3) = k (say). Then T(4) = k + k - k = k
T(5) = k+ k- k= k.
By mathematical induction it can be proved that T(n) = k, a constant.

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.