Answer (Choose 1 answer)
Suppose a singly linked list of integers is given below:
head) 7 1 6 4 3 12 8 2 (tail)(
What does the list look like after the following java code snippet is run?
int x = 9;
Node f = head;
while(f.next != tail) f = f.next;
Node q = new Node(x);
q.next = tail;f.next = q;
A. 7 1 6 4 3 12 8 2 9
B. 7 1 6 4 3 12 8 9 2
C. 7 1 6 4 3 12 9 8 2
D. 7 9 1 6 4 3 12 8 2
E. 9 7 1 6 4 3 12 8 2