Jane Street interview question

Implement a priority queue using a stack.

Interview Answers

Anonymous

28 Feb 2014

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

1

Anonymous

30 May 2017

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