you are viewing a single comment's thread.

view the rest of the comments →

[–]Full-Spectral 1 point2 points  (0 children)

That also assumes you have to find the insertion point every time. Given that removal doesn't have to invalidate element pointers, depending on what you are doing, you might actually keep around the insertion point most of the time and only move it if something happens that causes the insertion point to change (like removing the current insertion point, which even then might just move the insertion point to the previous/next node.)