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
D = 2
for i = 1 to n do
for j = i to n do
for k = j + 1 to n do
D = D * 3
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?
Consider the following C function.
Which one of the following most closely approximates the return value of the function fun1?
The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is _______.
Total Unique Visitors
Loading......