Homework_1

[Stacks and Queues; Vectors, Lists, and Sequences ]

The number of your particular task is the value of the expression faculty_number%17.
Write a complete program with at least one example in main function.


No

Task
Example
No.
0.
P-4.3 Implement the stack ADT using the STL vector class. Example 4.6
1

Implement the stack ADT using an array. Example 4.6
2
P-4.4
Implement the queue ADT using an array. Example 4.7
3.
P-4.5
Implement the queue ADT using a singly linked list (Code Fragment 4.22).
Example 4.7
4.
P-4.6
Complete the implementation of class LinkedDeque.
Example 4.8
5.
P-4.7
Implement the deque ADT with an array used in circular fashion.
Example 4.8
6.
P-4.8a
Implement the Stack interfaces with a unique class that is derived from class LinkedDeque.
Example 4.6
7.
P-4.8b Implement the Queue interfaces with a unique class that is derived from class LinkedDeque. Example 4.7
8

Complete the implementation of quadratic-time algorithm for Stock Span Problem (Code Fragment 4.26).

9

Complete the implementation of linear-time algorithm for Stock Span Problem (Code Fragment 4.27).
10.
P-5.1
Implement the vector ADT by means of an extendable array used in a circular fashion, so that insertions and deletions at the beginning and end of the vector run in constant time.
Example 5.1
11

Complete the implementation of class NodeList (Code Fragments 5.4 - 5.11). Example 5.4
12.
P-5.3
Implement the sequence ADT by means of an extendable array used in a circular fashion, so that insertions and deletions at the beginning and end of the sequence run in constant time.
13.
P-5.4
Implement the sequence ADT by means of a singly linked list.
14.

Complete the implementation of  bubble-sort using ranges (bubbleSort1 form Code Fragment 5.15).

15.

Complete the implementation of  bubble-sort using positions (bubbleSort2 form Code Fragment 5.15).
16.

Implement the ObjectIterator ADT to the NodeList class and complete print function (Code Fragment 5.16).