資料結構›Ch4 鏈結串列
第 17 題/共 22 題
◀ DS 17/22
17. Singly Linked List、刪除節點
#DS-04-017易Singly Linked List刪除節點

Given a node structure as shown below:

typedef struct Node {
    int data;
    struct Node* next;
} Node;

What will the following function do when used on a singly linked list?

void unknownFunction(Node* node) {
    if (node == NULL || node->next == NULL) {
        return;
    }
    node->data = node->next->data;
    Node* temp = node->next;
    node->next = node->next->next;
    free(temp);
}
📄 成大114
跳轉到第題
▤完整推導請見《WH 資工筆記 · 資料結構》Ch4 鏈結串列
本章題號 · 1–20 / 22