Solved

The Linked List Iterator Described in the Textbook Maintains a Reference

Question 8

Multiple Choice

The linked list iterator described in the textbook maintains a reference to the last visited node, called position, and a reference to the last node before that, called previous.Which of the following statements is NOT correct regarding advancing this iterator?


A) If another node exists, when the iterator is to be advanced, the position reference must be updated to position.next.
B) If the iterator currently points before the first element of the list, when the iterator is to be advanced, position must be set to point to the first node in the linked list.
C) If another node exists, when the iterator is to be advanced, the previous reference must be updated to point to the current location of the iterator
D) If the iterator currently points before the first element of the list, when the iterator is to be advanced, the position reference must be set to position.next and the previous reference must be set to point to the first node in the linked list.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents