Stacks and Queues Exercises

  < Previous  Next >
For the following data structures:
  1. Stack
    • Use PUSH() for INSERT()
    • Use POP() for DELETE()
  2. Queue
    • Use ENQUEUE() for INSERT()
    • Use DEQUEUE() for DELETE()
show the array elements after each of the following operations:
  1. INSERT( 1 )
  2. INSERT( 2 )
  3. DELETE()
  4. INSERT( 3 )
  5. DELETE()
  6. DELETE()

Last Modified: