Junior
What is the complexity of searching for an element in a LinkedList?
sobes.tech AI
Answer from AI
O(n), where n is the number of elements in the list. To find an element, LinkedList has to iterate through the elements sequentially, starting from the head or tail, until it finds the desired element or reaches the end of the list.