Junior
What is the worst-case time complexity of the contains() method for an element that is present in a LinkedList?
sobes.tech AI
Answer from AI
O(n), where n is the number of elements in the list. In the worst case, the method must examine the entire list to find the last element.