2 ms·
> That is because to find insertion/deletion place you must first run linear search on linked list and that costs a lot. That isn't always true. If you already
by thayne 5y ago
> That is because to find insertion/deletion place you must first run linear search on linked list and that costs a lot.
That isn't always true. If you already have a pointer to the position in the list, and the list has an API that supports it (which a good implementation would), then with a linked list you wouldn't need to traverse the list again.
That said, in most cases that probably isn't worth the downsides of a linked list, especially if the size of the list is small.