Computer Sciences > GATE 2014 SET-1 > Analysis of Algorithms
Consider the following pseudocode. What is the total number of multiplications to be performed?
D = 2
for i = 1 to n do
    for j = i to n do
        for k = j + 1 to n do
            D = D * 3
A
Half of the product of the 3 consecutive integers.
B
One-third of the product of the 3 consecutive integers.
C
One-sixth of the product of the 3 consecutive integers.
D
None of the above.

Correct : c

Similar Questions

Consider the following recurrence relation.T(n) = T(n/2) + T(2n/5) + 7n if n > 0T(n) = 1 if n = 0Which one of the following options is correct?
#1030 MCQ
Consider the following C function. Which one of the following most closely approximates the return value of the function fun1?
#1152 MCQ
The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is _______.
#1210 NAT

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......