40
(Choose 1 answer)
Select the statement that is most correct.
Suppose we are considering a singly linked list which is not empty. What does the java code snippet below do?
Node q = new Node(x);
q.next = head;head = q;
A. It inserts new node with value x after the head of the list.
B. It inserts new node with value x at the head of the list.