Question 1743 – Database-Management-System
March 8, 2024
Question 3235 – Research Aptitude
March 8, 2024
Question 1743 – Database-Management-System
March 8, 2024
Question 3235 – Research Aptitude
March 8, 2024

Question 8574 – Data-Structures

Consider the following pseudo code. 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

Correct Answer: C

Question 37 Explanation: 
D = 2
for i = 1 to n do

for j = i to n do

for k = j + 1 to n do

D = D * 3;

Also you can try for smaller ‘n’.
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.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!