Question: 1 [10+6 Marks] (A) [10 Marks] Write a method remove of the class Single Linked List (class for single linked list) that accepts a parameter,
1 [10+6 Marks] (A) [10 Marks] Write a method remove of the class Single Linked List (class for single linked list) that accepts a parameter, item of type E. The method deletes the first occurrence of item from the linked list, if found and return true. If item is not found in the linked list then return false. Consider all possible cases. Do not call any method of class SingleLinkedList in your method. Example: item: 15 List (before method call): 8 10 15 20 4 5 16 List (after method call): 8 10 20 4 5 16 Method Hear
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
