Computer Sciences > GATE 2023 > Algorithms
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)

Explanation

Correct : b,d

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science