Question 144Asked in DSSSB TGT Computer Science, 24 Jun 2023, Shift 3 (4:30 PM)

Arrange the following in the order of growth. O(n), O(n²), O(2ⁿ), O(log n), O(n log n), O(n² log n)

Arrange the following in the order of growth. O(n), O(n²), O(2ⁿ), O(log n), O(n log n), O(n² log n)
  1. AO(n), O(n²), O(log n), O(2ⁿ), O(n log n), O(n² log n)
  2. BO(n), O(2ⁿ), O(2ⁿ), O(log n), O(n² log n), O(n log n)
  3. CO(log n), O(n), O(n log n), O(n²), O(n² log n), O(2ⁿ)
  4. DO(n²), O(n), O(2ⁿ), O(log n), O(n log n), O(n² log n)
Show answerHide answer

Correct answer: (C) O(log n), O(n), O(n log n), O(n²), O(n² log n), O(2ⁿ)

Explanation

Growth order: log n < n < n log n < n² < n² log n < 2ⁿ. Exponential growth is the fastest.

From DSSSB TGT Computer Science PYQ, 24 Jun 2023, Shift 3 (4:30 PM)

This is question 144 of DSSSB TGT Computer Science PYQ, 24 Jun 2023, Shift 3 (4:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.