203.移除链表元素
题目链接
比较通用的思路是加一个dummyhead,那我就不用它,用二级指针做一下
class Solution {
public:
ListNode* removeElements(ListNode* head, int val) {
ListNode **p = &head;
while(*p){
if((*p)-
203.移除链表元素
题目链接
比较通用的思路是加一个dummyhead,那我就不用它,用二级指针做一下
class Solution {
public:
ListNode* removeElements(ListNode* head, int val) {
ListNode **p = &head;
while(*p){
if((*p)-