Q29
Let and be functions of natural numbers given by and .
Which of the following statements is/are TRUE?
Which of the following statements is/are TRUE?
More than one option can be correct.
Show answer without attempting
Answer: A, C
GATE CS · Algorithm Analysis · 2 questions
2 Asymptotic Worst Case Time Complexity questions from GATE CS papers (2023), each with the official answer key. Part of Algorithm Analysis. Answer any question right here and it is marked straight away, or practise them one at a time.
Answer: A, C
Function_1 and Function_2 expressed in pseudocode as follows:Function_1
while n > 1 do
for i = 1 to n do
x = x + 1;
end for
n = ⌊n/2⌋;
end while
Function_2
for i = 1 to 100 * n do
x = x + 1;
end forFunction_1 and Function_2, respectively.Answer: A, D
0/20 correct0 marks