36. 在串列(linked list)的資料結構中,假設head是指向一個串列的頭的指標,next是用來指向下一個串列元件的指標。現在有一個新增的元件為p,要加到此串列的最前頭,則下列何者為正確的步驟?
(A) headnext=p;
(B) pnext=headnext;head=p;
(C) head=p; pnext=headnext;
(D) pnext=head;head=p;

參考答案

無參考答案

內容推薦

內容推薦