• edited by
2,265 views
2 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.

2 Answers

5 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 –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
Position:
Show:

Related questions

0 0 votes
1 1 answer
4.0k
4.0k views
Nitesh Choudhary asked Apr 22, 2017
4,019 views
i want to read Tanenbaum Datastructure book. Can anyone tell me the source of pdf Tanenbaum Datastructure book ?
0 0 votes
0 0 answers
900
900 views
abhishek1995_cse asked Dec 9, 2018
900 views
is hashing there in gate 2019 syllabus?
1 1 vote
2 answers 2 answers
2.7k
2.7k views
Prince Sindhiya asked Aug 11, 2018
2,704 views
We are provided with an undirected connected graph such that weight of all the edges is equal to some constant k. We wish to find the shortest distance between given pair...
0 0 votes
1 1 answer
1.1k
1.1k views
Na462 asked May 20, 2018
1,078 views
A min heap having $1024$ distinct elements with keys ranging from $0$ to $1023$ is stored in array of $1024$ indices. The maximum difference between $(n/2)^{th}$ element ...