1. A Queue ADT can be implemented as an Array or a Linked List.
Required:
Considering all the possible operations of a Queue, implement the Queue ADT as an
abstract C++ class. Inherit from the abstract class, some two classes to implement the
queue using an array and a linked list.
Use some sample data to test ALL the operations and preferably print some sample
output.
2. Algorithm Analysis.
Compare the asymptotic analysis for the following two pieces of code. Show
your calculations for each code.
Code 1
sum = 0;
for (i=1; i<=n; i++)
for (j=1; j<=n; j++)
sum++;
Code 2
sum = 0;
for (i=1; i<=n; i++)
for (j=1; j<=i; j++)
sum++;
for (k=0; k<n; k++)
A[k] = k;
