133k views
4 votes
.in the array based list implementation of the ADT what is the worst case time efficiency of the getEntry method?

a.O(n2)
b.O(1)
c.O(n)
d.O(logn)

User Babi
by
8.4k points

1 Answer

5 votes

Answer:

c.O(n)

Step-by-step explanation:

In the array based list implementation of the ADT the worst case time complexity of the getEntry method is O(n).In the worst case it has to travel upto n elements then it has to do the operation.In doing so the time complexity will come out to be O(n).So we conclude that the answer to this question is O(n).

User Mirza Selimovic
by
7.4k points