题解 | #删除链表的节点#
删除链表的节点
http://www.nowcoder.com/practice/f9f78ca89ad643c99701a7142bd59f5d
if(head.val == val){
return head.next;
}
ListNode cur = head.next;
while(cur != null){
if(cur.val == val){
cur.val = cur.next.val;
cur.next = cur.next.next;
break;
}
cur = cur.next;
}
return head;
}