Project in Chapter 16 asked you to implement the method mode. Show how you would implement this method for the class SortedLinkedList, as described in Segment 17.12.
Exercise 3 asked you to create an algorithm to find the mode of a sorted list. Let’s add a method to the implementation of a sorted list that finds the list’s mode. The header of such a method could be
public T mode()
Implement this method in three ways, as follows:
a. Use only sorted list operations.
b. Assume an array-based implementation.
c. Assume a linked implementation.
Exercise 3
Write an equals method for the class SortedLinkedList, as described in Segment 17.12, that overrides the method equals inherited from the class Object. Assuming that objects in the list have an appropriate implementation of equals, your new method should return true if each entry in one list equals the corresponding entry in a second list.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.