問題詳情

20. 下列程式碼片段何者執行雙向鏈結串列的節點刪除(this 指向目前節點,pre 及 next 分別指向 this 之前、後節點)?
(A) this->next->pre = this->next;this->pre->next = this->pre;free(this);
(B) this->pre->next = this->pre;this->next->pre = this->next;free(this) ;
(C) this->pre->pre = this->next;this->next->next = this->pre;free(this);
(D) this->pre->next = this->next;this->next->pre = this->pre;free(this);

參考答案

無參考答案

內容推薦

內容推薦