Wipro Interview Question

Use of stack and queue