Skip to content

Problems

Stacks

  1. In what order are operations performed with a stack?
  2. What are the basic operations for a stack?
  3. What is a real life example of a stack?
  4. What are the time complexities of the operations?
  5. In what ways can you implement a stack?
  6. Draw the end state of the following stack:
    1
    2
    3
    4
    5
    6
    7
    8
    push(3)
    push(3)
    pop()
    push(7)
    pop()
    push(9)
    push(2)
    pop()
    

Queues

  1. In what order are operations performed with a queue?
  2. What are the basic operations for a queue?
  3. What are the time complexities of the operations?

Comments