Question: Write a method removeDuplicates(), which when calles by a SortedLinkedList removes all duplicate items from the SortedLinkedList. you can assume the LinkedList is sorted in
Write a method removeDuplicates(), which when calles by a SortedLinkedList removes all duplicate items from the SortedLinkedList. you can assume the LinkedList is sorted in increasing order and you dont have to check if the list is empty. You can also assume that the LinkedList has only numbers.
// this is an instance method // so you have to access to head, tail, and the Node class
public void removeDuplicates() {
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
