Consider functions Function\1 and Function\2 expressed in pseudocode as follows: Function1 while n > 1 do for i = 1 to n do x = x + 1; end for n = ⌊n/2⌋; end while Function2 for i = 1 to 100 * n do x = x + 1; end for Let f1(n) and f2(n) denote the number of times the statement “x = x + 1” is executed in Function\1 and Function\2, respectively. Which of the following statements is/are TRUE?
Topic-wise GATE CS PYQs with verified steps
