Write the contents of an array queue after each of the following operations (be sure to clearly indicate the front and rear elements in the queue):
- enqueue( 's' )
- enqueue( 't' )
- enqueue( 'r' )
- enqueue( 'e' )
- enqueue( 's' )
- enqueue( 's' )
- enqueue( 'e' )
- enqueue( 'd' )
- dequeue( )
- dequeue( )
- dequeue( )
- dequeue( )
- dequeue( )
- dequeue( )
- dequeue( )
- dequeue( )
Repeat with a linked queue.
Write the representation of the array-based queue (assuming it has a requested size of 10) and the above operations are performed and then the following operations are performed:
- enqueue( '!' )
- enqueue( '?' )
- enqueue( '@' )
- dequeue( )
- dequeue( )
- dequeue( )