###### Algorithms

October 12, 2023###### Algorithms

October 12, 2023# Algorithms

Question 39 |

Consider the following two functions:

Which of the following is true?

g _{1}(n) is O(g_{2}(n)) | |

g _{1} (n) is O(^{3}) | |

g _{2} (n) is O(g_{1} (n)) | |

g _{2} (n) is O(n) | |

Both A and B |

Question 39 Explanation:

In asymptotic complexity, we assume sufficiently large n. So, g

Growth rate of g

_{1}(n) = n^{2}and g_{2}(n) = n^{3}.Growth rate of g

_{1}is less than that of g_{2}i.e., g_{1}(n) = O(g_{2}(n)) = O(n).Correct Answer: E

Question 39 Explanation:

In asymptotic complexity, we assume sufficiently large n. So, g

Growth rate of g

_{1}(n) = n^{2}and g_{2}(n) = n^{3}.Growth rate of g

_{1}is less than that of g_{2}i.e., g_{1}(n) = O(g_{2}(n)) = O(n). Subscribe

Login

0 Comments