...
Question 4248 – Data-Interpretation
May 4, 2024
Question 10613 – Theory-of-Computation
May 4, 2024
Question 4248 – Data-Interpretation
May 4, 2024
Question 10613 – Theory-of-Computation
May 4, 2024

Question 11621 – Asymptotic-Complexity

Consider the following two functions:

g1(n) = {n3 for 0≤n<10,000 n2 for n≥10,000  
g2(n) = {n for 0≤n<100 n3 for n≥100  

Which of the following is true?

Correct Answer: A

Question 10 Explanation: 
Whenever we go for asymptotic complexity, we look for large value of n. So in the given question, for large value of n like n>=10000, g1(n)=n2 and g2(n)=n3. So clearly g1(n) is O(g2(n)).
A
g1(n) is O(g2(n))
B
g1(n) is 0(n3)
C
g2(n) is 0 (g1(n))
D
g2(n) is 0(n)
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!