Java Reference
In-Depth Information
For the queue implementation presented in Section 16.1.2, show how
to copy the queue elements in the
doubleQueue
operation without mak-
ing calls to
increment
.
16.8
PROGRAMMING PROJECTS
16.9
An output-restricted double-ended queue supports insertions from
both ends but accesses and deletions only from the front. Implement
this data structure with a singly linked list.
Suppose that you want to add the
findMin
(but not
deleteMin
) opera-
tion to the stack repertoire. Implement this class as two stacks, as
described in Exercise 6.5.
16.10
Suppose that you want to add the
findMin
(but not
deleteMin
) opera-
tion to the
Deque
repertoire. Implement this class using four stacks. If
a deletion empties a stack, you will need to reorganize the remaining
items evenly.
16.11
Search WWH ::
Custom Search