Let n be the least integer such that f(x) is O(xⁿ). Arrange the following functions in increasing order of n: A. f(x) = 3x³ + (log x)⁴ B. f(x) = (x⁵ + x² + 1)/(x³ + 1) C. f(x) = (x³ + x² + 1)/(x² + 1) D. f(x) = (x² + 5 log x)/(x² + 1)
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. D, C, B, A
Explanation
A grows like x³ (n = 3); B like x² (n = 2); C like x (n = 1); D tends to a constant (n = 0). Increasing order: D, C, B, A.
More Data Structures and Algorithms questions
- Match List - I with List - II. f(n) = a f(n / b) + g(n) is a divide-and- conquer recurrence relation for the Listed-I algorithms, match the…
- The height of a binary search tree for the words banana, peach, apple, pear, coconut, mango and papaya using alphabetical order is :
- How much time does an algorithm using 2⁵⁰ bit operations need if each bit operation takes 2⁻³⁸ seconds?
- A lower-triangular sparse matrix is one :
- Arrange the following prefix expressions by value in increasing order: A. + − * 2 / 8 4 3 2 B. ↑ − * 3 3 * 4 2 5 C. + − ↑ 3 2 ↑ 2 3 / 6 − 4…
- Which of the following are true for a complete binary tree? A. It has always odd number of vertices. B. With i internal vertices, it has i+…