A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The…

2015

A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The minimum time needed to sort 100 names will be approximately

Answer: B. 6.7 secQuick Sort complexity is O(n log n). Using proportionality: T(100)/T(1000) = (100 log 100)/(1000 log 1000). Simplifying logs: (100 * 2)/(1000 * 3) = 1/15.…

  1. A.

    50.2 sec

  2. B.

    6.7 sec

  3. C.

    72.7 sec

  4. D.

    11.2 sec

Attempted by 378 students.

Show answer & explanation

Correct answer: B

Quick Sort complexity is O(n log n). Using proportionality: T(100)/T(1000) = (100 log 100)/(1000 log 1000). Simplifying logs: (100 * 2)/(1000 * 3) = 1/15. Thus T(100) ≈ 100 * (1/15) ≈ 6.7 seconds.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…