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 Exam)

For each function below, let n be the least integer such that f(x) is O(xⁿ). Arrange the 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)
Choose the correct answer from the options given below:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. D, C, B, A

Explanation

A ~ x³ (n = 3), B ~ x² (n = 2), C ~ x (n = 1), D ~ 1 (n = 0). Increasing: D, C, B, A.

More Data Structures and Algorithms questions