[理工] [資結] 98台大醫工
6. For the following statements about linked-list,
which of the following statement(s) is(are) true?
(A) The operation of inserting or deleting a node of a
singly-linked-list has the complexity O(1).
(B) If a singly-linked-list is used to implement a stack,it is more
efficient to have the top of the stack at the tail of the list.
(C) If a singly-linked-list is used to implement a queue, it is more
efficient to have the front of the queue to be at the head of the
linked list, and the rear of the linked list to be at the tail of
the list.
(D) Given the pointer to the node to be deleted, the node deleting
operation if a doubly-linked-list has lower complexity than that
of a singly-linked-list.
(E) One of the advantages of circular linked list is that it is able to
traverse the list starting at any point.
答案是(C)(D)(E)
但我寫(B)(C)(E)
想問(B)為什麼是false?
另外(D)在給定要刪節點的指標下,
double 不是比 single 來的複雜嗎?
因為 double 不是有兩個指標要變更
而 single 只要變更一個指標就好
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.248.213.75
→
02/16 12:44, , 1F
02/16 12:44, 1F
→
02/16 12:44, , 2F
02/16 12:44, 2F
→
02/16 12:46, , 3F
02/16 12:46, 3F
→
02/16 14:01, , 4F
02/16 14:01, 4F
→
02/16 14:03, , 5F
02/16 14:03, 5F