Question: data sturucture Question 13 3 Points Assume the following method is within the SingleLinkedlist class, what does it do? public void Undefined(E item. E item2)

data sturucture
data sturucture Question 13 3 Points Assume the following method is within

Question 13 3 Points Assume the following method is within the SingleLinkedlist class, what does it do? public void Undefined(E item. E item2) Node ptr = head while (ptr null) if(ptr.data.equals(item1)) head = new Node(item2, head): return; > ptraptr next: > A Adds a node before the first node with its data as item2. If item1 exists as data of the first node in the list. 8 Adds a node before the first node with its data as item2, if item1 exists anywhere in the list. Adds a node after the last node with its data as item2. if iterni exists anywhere in the list. D Adds a node after the last node with its data as item2, if item1 exists as data of the first node in the list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!