判断题

以下是链表删除节点的算法,请补全代码。 DoubleNode* dele...

发布于 2022-03-03 16:22:14

以下是链表删除节点的算法,请补全代码。
DoubleNode* deleteTheNode(DoubleNode* head,int num)
{
	DoubleNode*p = head
	if (p->data == num)
    {
        head = p->next
        head->prev = NULL
        free(p)
        return head
    }
	
	while(p)
	{
		if (p->data == num)
        {
			()
			p->next->prev = p->prev
			free(p)
			return head
        }
		p = p->next
	}
	
	printf("not found!\n")
	return head
}

关注者
0
被浏览
14
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看