GATE CSE
First time here? Checkout the FAQ!
x
0 votes
51 views

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)

asked in Algorithms by Junior (703 points) 3 26 | 51 views

1 Answer

+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)
answered by Active (2.1k points) 4 9
selected by

Related questions

0 votes
1 answer
2
asked in Algorithms by rahul sharma 5 Veteran (14.9k points) 12 104 313 | 34 views
+1 vote
1 answer
3
asked in Algorithms by pC Veteran (22.8k points) 46 216 358 | 68 views


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23324 Points

  2. Bikram

    17048 Points

  3. Habibkhan

    7808 Points

  4. srestha

    6222 Points

  5. Debashish Deka

    5430 Points

  6. jothee

    4958 Points

  7. Sachin Mittal 1

    4772 Points

  8. joshi_nitish

    4286 Points

  9. sushmita

    3964 Points

  10. Rishi yadav

    3794 Points


Recent Badges

Nice Comment junaid ahmad
Popular Question iarnav
Notable Question makhdoom ghaya
Popular Question LavTheRawkstar
Avid Voter atul_21
Popular Question hem chandra joshi
100 Club nikhil_cs
Notable Question Sukannya
Notable Question Sourabh Kumar
Notable Question shikharV
27,287 questions
35,135 answers
83,911 comments
33,223 users