第20741题 单选题
给定C++双向链表实现代码,is_empty()函数横线处不能填写的是?
// 节点结构体
struct Node {
    int data;
    Node* prev;
    Node* next;
};
// 双向链表结构体
struct DoubleLink {
    Node* head;
    Node* tail;
    int size;
    DoubleLink() {
        head = nullptr;
        tail = nullptr;
        size = 0;
    }
    ~DoubleLink() {
        Node* curr = head;
        while (curr) {
            Node* next = curr->next;
            delete curr;
            curr = next;
        }
    }
    // 判断链表是否为空
    bool is_empty() const {
        ________
    }
};
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析