3 ms·
This property is only helpful if you have a reference to the node or are only making head/tail updates. If you have to do any amount of iteration, you're usuall
by dehrmann 5y ago
This property is only helpful if you have a reference to the node or are only making head/tail updates. If you have to do any amount of iteration, you're usually better off just rebuilding the list. It takes less memory, and is better on the cache.
The one other time a linked list is really good is if the list is large, and you can't afford the chance that you need to resize the array backing the vector.