问题
I am just curious about node . node.next and node.next. Until now we have read that node has two part in which it store data and address of next node(node.next) then whats about node.next.next. ? Where the address of node.next.next will be stored. I just implemented node.next.next to delete a number from the end of list. Its working well. Butt i don't know about node.next.next?? please help me in understanding of concept of nodes. Here is code in which i implemented node.next.next.
public void del_`enter code here`end(){
Node temp = head;
while(temp.next.next!=null ){
temp= temp.next;
}
temp.next= null;
}
回答1:
node = current node
node.next = next node to current
node.next.next = 2nd node from current node
little more explanation about how's your logic work
来源:https://stackoverflow.com/questions/40566549/what-is-node-node-next-and-node-next-next-in-linked-list