Remove Linked List Elements
Jun 22, 2018
移除链表中的元素
Remove all elements from a linked list of integers that have value val.
Example:
1 | Input: 1->2->6->3->4->5->6, val = 6 |
1 | const removeElements = function(head, val) { |
Remove all elements from a linked list of integers that have value val.
Example:
1 | Input: 1->2->6->3->4->5->6, val = 6 |
1 | const removeElements = function(head, val) { |