| 1. |
Sahni, Chapter 10, Question 15
- Write a singly-linked implementation of the double-ended queue (deque) ADT introduced in Practice Sheet 4.
- What is the complexity of each of the methods you have written?
- What are the advantages and disadvantages of the singly-linked implementation over the block implementation?
|
| 2. |
Based on Sahni, Chapter 10, Questions 8 and 9
- Write implementations of both the stack and queue ADTs by using the deque ADT.
- What are the advantages and disadvantages of this approach?
|
| 3. |
Sahni, Chapter 10, Questions 8 and 9
- Write implementations of both the stack and queue ADTs by sub-classing the deque ADT.
- What are the advantages and disadvantages of this approach?
|