NTA-UGC-NET 2021 Dec & 2022 June Paper-1
November 30, 2024
Higher-Education-and-Politics
December 3, 2024
NTA-UGC-NET 2021 Dec & 2022 June Paper-1
November 30, 2024
Higher-Education-and-Politics
December 3, 2024

Algorithms

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

Leave a Reply

Your email address will not be published. Required fields are marked *