Last updated 5 years ago
LinkedList的结构
insert a node 注意:head = newest,这是为了把head指针重新更新,指向新的node
head = newest
delete a node
参考
http://blog.csdn.net/feliciafay/article/details/6841115
指针的含义
ListNode dummy = new ListNode(0); //建立一个dummynode dummy.next = head; //把head连接在dummy后面 head = dummy; //把head的指针移动到dummy处
注意:head = dummy,永远是左边的指针移动到右边去。
head = dummy