Question: 2 4 ) To remove the first node in a nonempty linked list, A ) set a reference pred to the predecessor of the node
To remove the first node in a nonempty linked list,
A 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
B delete the node by setting the head reference to null:
head null;
C move the successor reference in the head node one node forward:
head.next head.next.next;
D move the head reference one node forward:
head head.next;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
