算法第七行为啥不是if(!p||j>i-1) ?

2025-03-23 22:10:49
推荐回答(1个)
回答1:

你好,p = L,这里p是一定有地址的,不需要判断p是否为空。这里因为下面要操作q->next也就是p->next->next所以要检查p->next是否为空