The JCF class Deque had a method called contains diat would return true if an Object was in the deque. For a queue, the method could be specified as follows:
public boolean contains(Object o)
// Returns true if this queue contains the specified element.
a. Add this method to the QueueListBased implementation given in this chapter.
b. Add this method to the QueueArrayBased implementation given in this chapter.
c. Add this method to the QueueReferenceBased implementation given in this chapter.
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.