Question: Question 6 Assume that class Node and class SinglyLinkedList for lists of integers contains the methods which are summarized in the table below. Extend class

Question 6 Assume that class Node and class SinglyLinkedList for lists of integers contains the methods which are summarized in the table below. Extend class SinglyLinkedList by writing a method removeAlloccurrencesof smallest that finds and deletes all the occurrences of the smallest element in the list class Node int getInfo() Returns the value of info of the node, int getLink() Returns the reference of the next node. class SinglyLinkedlist void addFirst(int info) Inserts the specified element at the beginning of this list boolean contains (int info) Returns true if this list contains the specified element. int getFirst() Returns the first element in this list Question Completion Status: int getLink() Returns the reference of the next node. class SinglyLinkedlist void addFirst (int info) Inserts the specified element at the beginning of this list. boolean contains (int info) Returns true if this list contains the specified element int getFirst() Returns the first element in this list. boolean isEmpty() Returns true if this list is empty. int remove (int info) Removes the first occurrence of the element in this list. int size() Returns the number of elements in this list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
