202k views
3 votes
)in the link based implementation of the ADT sorted list what is the worst case time efficiency of the remove method?

A. O(1)

B.O(logn)

C.O(n)

D.O(n2)

User Romiem
by
8.7k points

1 Answer

3 votes

Answer:

C.O(n).

Step-by-step explanation:

The worst case time complexity of remove method in linked list based implementationof ADT sorted list is O(n) . The worst case would be when you have to remove the element that is placed at the end.So we have to traverse the whole list and reach upto that node then remove that node or element.

User Uberwach
by
9.1k points