Jane Street Interview Question

Implement a priority queue using a stack.

Interview Answers

Anonymous

Feb 28, 2014

Are you sure he asked you to use only one stack?

1

Anonymous

May 30, 2017

You can utilize the call stack as your second stack by using recursion.