第32052题 单选题
以下关于Python实现单链表删除节点操作的描述,正确的是?

假设单链表节点定义如下:

class ListNode:
    def __init__(self, val=0, next=None):
        self.val = val
        self.next = next

现给定单链表的头结点head,需要删除值等于target的第一个节点。

{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析