doubly linked list
Doubly linked list insertAt:
I'm kinda of confused about the inserting of a new node here and links.
Lets say we have A->B and I insert G
so,
curr = B
G.next = B
G.prev = A
all fine but now:
curr.prev = G
then if we are doing curr.prev.next, wont that be B.next = G??? ERRR! Or in the memory the link is there and it's acutally A.next = G
0 Replies