PA of Algorithms Q52

0. An array of n numbers is given, where n is an even number. The maximum as well as the minimum of these n numbers needs to be determined. Which of the following is true about the number of comparisons needed?

  • Option : B
  • Explanation :
    Since,
    2n – c = average number of comparison needed.
    1.5 n – 2 = number of comparison in case.
    n log2n = also doesn't conform with number of comparison needed.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *