GATE 2023 Computer Science and Information Technology question: Consider functions Function 1 and Function 2 expressed in pseudocode as follows:…
Consider functions Function_1 and Function_2 expressed in pseudocode as follows:
| Function_1 | Function_2 |
|---|---|
| ``` | |
| while n > 1 do |
for i = 1 to n do
x = x + 1;
end for
n = ⌊n/2⌋;
end while|
for i = 1 to 100 * n do
x = x + 1;
end for
Let and denote the number of times the statement “” is executed in **Function_1** and **Function_2**, respectively.
Which of the following statements is/are TRUE?
Show answer
Official answer: A,D