この多肢選択式の質問で、最終的な回答 (e の選択) が false である理由について、私は混乱しています。
Which of the following statements is the most accurate regarding linked lists?
a. Linked-lists take up more space than STL vectors because they allocate extra storage
space for future growth.
b. The asymptotic complexity of inserting at the end of a doubly-linked list container
storing only the pointer to the first element is O(1).
c. A loop in a singly-linked-list can be found in O(log(n)) time and O(n) memory overhead
d. A loop in a singly-linked-list can be found in O(n) time and O(1) memory overhead.
e. The number of elements in a linked-list is end_ptr -start_ptr + 1, where start_ptr points
to the first element in the linked list and end_ptr points to the last item of the linked-list.
つまり、両方がd でないのはなぜですか。そしてe。正しい?イテレータが でサイズを返すのはend_ptr-start_ptr+1
どのような場合で、そうでないのはどのような場合でしょうか? end_ptr-start_ptr
選択は代わりに述べるべきでしたか?