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? - Study24x7
Social learning Network

Warning: include(./views/auth.php): failed to open stream: Permission denied in /var/www/html/live/loginRightSlider.php on line 18

Warning: include(): Failed opening './views/auth.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/live/loginRightSlider.php on line 18
22 Mar 2019 10:17 AM study24x7 study24x7

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?

A

At least 2n-c comparisons, for some constant c, are needed.

B

At most 1.5n-2 comparisons are needed.

C

At least nlog2n comparisons are needed.

D

None of the above.

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles