Solved

To Remove the First Node in a Nonempty Linked List

Question 4

Multiple Choice

To remove the first node in a nonempty linked list,


A) move the successor reference in the head node one node forward:
Head.next = head.next.next;
B) set a reference pred to the predecessor of the node you want to remove,and set the successor of pred to the successor of the head
C) move the head reference one node forward:
Head = head.next;
D) delete the node by setting the head reference to null:
Head = null;

Correct Answer:

verifed

Verified

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

Related Questions