Algorithms
October 12, 2023Algorithms
October 12, 2023Algorithms
Question 39 |
Consider the following two functions:
Which of the following is true?
g1(n) is O(g2(n)) | |
g1 (n) is O(3) | |
g2 (n) is O(g1 (n)) | |
g2 (n) is O(n) | |
Both A and B |
Question 39 Explanation:
In asymptotic complexity, we assume sufficiently large n. So, g1(n) = n2 and g2(n) = n3.
Growth rate of g1 is less than that of g2 i.e., g1(n) = O(g2(n)) = O(n).
Growth rate of g1 is less than that of g2 i.e., g1(n) = O(g2(n)) = O(n).
Correct Answer: E
Question 39 Explanation:
In asymptotic complexity, we assume sufficiently large n. So, g1(n) = n2 and g2(n) = n3.
Growth rate of g1 is less than that of g2 i.e., g1(n) = O(g2(n)) = O(n).
Growth rate of g1 is less than that of g2 i.e., g1(n) = O(g2(n)) = O(n).
Subscribe
Login
0 Comments