PA of Algorithms Q71

0. An unordered list contains n distinct elements. The number of comparisons to find an element in this list that is neither maximum nor minimum is

  • Option : D
  • Explanation :
    Suppose a list contains n elements, consider first three element and find middle element which will be neither maximum nor minimum. Hence it is θ(1).
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 *