NTA-UGC-NET 2021 Dec & 2022 June Paper-1
November 30, 2024Higher-Education-and-Politics
December 3, 2024Algorithms
Question 5
|
Consider functions Function 1 and Function 2 expressed in pseudocode as follows:
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?

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?
f1(n) ε Θ(f2(n))
|
|
f1(n) ε o(f2(n))
|
|
f1(n) ε ω(f2(n))
|
|
f1(n) ε O(n)
|
Correct Answer: D