All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · June 2024 (Cancelled)

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