How can I implement inserting element in the middle of DoubleLinkedList without coping it? In general I want to find some element in the collection and then insert a new one after it.
There is method DoubleLinkedList.insert but I'm not quite sure how it works. In the documentation it's described this way:
Insert linked list that at current position of this linked list
But what is the current position in the linked list? How can I set it?
I want to have O(1) insertion time.