DataStructures-and-Algorithms

Code Challenge

Implement a Queue using two Stacks.

Specifications

Challenge Setup & Execution

Branch Name: stack-queue-pseudo

Challenge Type: Code Challenge / Algorithm

Feature Tasks

NOTE: The Stack instances have only push, pop, and peek methods. You should use your own Stack implementation. Instantiate these Stack objects in your PseudoQueue constructor.

Example

enqueue(value)

Input Args Output
[10]->[15]->[20] 5 [5]->[10]->[15]->[20]
  5 [5]

dequeue()

Input Output Internal State
[5]->[10]->[15]->[20] 20 [5]->[10]->[15])
[5]->[10]->[15] 15 [5]->[10]

Requirements

Ensure your complete solution follows the standard requirements.

  1. Write unit tests
  2. Follow the template for a well-formatted README
  3. Submit the assignment following these instructions