A lot of what I'm reading says that removing an internal element in a doubly linked list (DLL) is O(1)
; but why is this the case?
I understand why it's O(n)
for SLLs; traverse the list O(n)
and remove O(1)
but don't you still need to traverse the list in a DLL to find the element?