Question regarding linked lists vs vectors w/ regards to efficiency.
I understand linked lists insertions/deletions are constant time whereas the same operations with vectors are linear. However, considering you have to perform a linear search on a linked list in order to insert/delete, doesn't that end up being a linear operation.
The insertion/deletion operation itself is constant but since you cannot insert/delete w/o traversing the linked list, you end up with a linear operation. search + insert/delete = linear.
So I don't understand how that is an advantage over a vector. For me, it is the same. Both (ultimately) require a linear operation in order to insert/delete.
What am I missing here?