in Algorithms
265 views
0 votes
0 votes

Q.  An unordered list contains n distinct elements. The number of comparisons to find an element in this list that is either maximum           or minimum is

A

O(nlogn)

B

O(n)

C

O(logn)

D

O(1)

in Algorithms
265 views

1 Answer

2 votes
2 votes
Best answer
Since List is unordered , to find out either max or max you need to scan entire list at least one time
so its O(n)
selected by
by

Related questions