Amazon interview question

Implement stack and queue with the help of priority queue