203-Remove Linked List Elements
100-Same Tree | Links:
题意
Remove all elements from a linked list of integers that have value val.
Example:
Input: 1->2->6->3->4->5->6, val = 6
Output: 1->2->3->4->5
思路
- 链表删除
分析:
- Time: O(n)
- Space: O(1)
100-Same Tree | Links:
Remove all elements from a linked list of integers that have value val.
Example:
Input: 1->2->6->3->4->5->6, val = 6
Output: 1->2->3->4->5