Amazon Interview Question

Implement stack and queue with the help of priority queue