Remove all elements from a linked list of integers that have valueval.
Example
Given:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,val= 6
Return:1 --> 2 --> 3 --> 4 --> 5
边界值检查总是有问题, 郁闷!
要判断pre == null的情况!!!
Remove all elements from a linked list of integers that have valueval.
Example
Given:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,val= 6
Return:1 --> 2 --> 3 --> 4 --> 5
边界值检查总是有问题, 郁闷!
要判断pre == null的情况!!!
本文标题:203. Remove Linked List Elements
本文链接:https://www.haomeiwen.com/subject/racxmttx.html
网友评论