complexitylinked-lists
Linked lists work best when the node is already known
Anonymous
inserting or removing near a known node can take O(1) pointer updates. Finding a node by position still takes O(n), and walking through separate nodes can have worse locality than scanning an array.
0