Linked List iterating over and inserting an element around (before/after) the current position.

Boris-Barboris ismailsiege at gmail.com
Sun May 19 22:44:58 UTC 2019


On Sunday, 19 May 2019 at 22:20:48 UTC, Josh wrote:
> This is just more curiosity, but do you happen to know why I 
> have to use DList.linearRemove() instead of DList.remove()?

These two functions are separate because they differ in 
complexity. remove is O(1), linearRemove on the other hand 
eagerly walks through the Take range, wich makes it 
O(take.walklength).


More information about the Digitalmars-d-learn mailing list