edited by
994 views
2 votes
2 votes

Which of the following data structures would programmer be least likely to use to implement an abstract data type that must include an efficient implementation of the operation " find the maximum"?

  1. Ordered array.
  2. Binary search.
  3. Heap.
  4. Ordered linked list.

edited by

2 Answers

5 votes
5 votes

the answer should be d. ordered linked list.(if ordering is done in ascending order then it will take O(n) time to retrieve max value as it need to traverse the link list)

the question is asking least likely to be used not most likely.

–2 votes
–2 votes
I think it will be array

(A) Array could take O(n) time

(B) Binary search takes O(log n) times

(C) Heap takes O(n log n) times

(D) ordered linked list maximum could take O(n) times
edited by

Related questions

0 votes
0 votes
1 answer
1
Nitesh Choudhary asked Apr 22, 2017
3,419 views
i want to read Tanenbaum Datastructure book. Can anyone tell me the source of pdf Tanenbaum Datastructure book ?
0 votes
0 votes
0 answers
2
abhishek1995_cse asked Dec 9, 2018
588 views
is hashing there in gate 2019 syllabus?
0 votes
0 votes
1 answer
4