Leetcode 203(Java)

Remove all elements from a linked list of integers that have value val.web Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5svg 链表类问题的解决一般要复刻一个链表,创建一个空头。再用两个指针遍历一遍链
相关文章
相关标签/搜索