SAP interview question

Implement a Queue using a stack.

Interview Answer

Anonymous

15 Jan 2019

We use two stacks, with top of each as front and rear end pointers. or if only one stack is required, a length variable could be maintained.