@@ -0,0 +1,989 @@
+import java.util.LinkedList;%0Aimport java.util.Queue;%0A%0Apublic class MyStack %7B%0A%0A    private Queue%3CInteger%3E queue;%0A%0A    /** Initialize your data structure here. */%0A    public MyStack() %7B%0A        queue = new LinkedList%3CInteger%3E();%0A    %7D%0A%0A    /** Push element x onto stack. */%0A    public void push(int x) %7B%0A%0A        queue.add(x);%0A%0A        for (int i = 1; i %3C queue.size(); i++) %7B%0A            queue.add(queue.remove());%0A        %7D%0A%0A    %7D%0A%0A    /** Removes the element on top of the stack and returns that element. */%0A    public int pop() %7B%0A        return queue.remove();%0A    %7D%0A%0A    /** Get the top element. */%0A    public int top() %7B%0A        return queue.peek();%0A    %7D%0A%0A    /** Returns whether the stack is empty. */%0A    public boolean empty() %7B%0A        return queue.isEmpty();%0A    %7D%0A%0A%7D%0A%0A/**%0A * Your MyStack object will be instantiated and called as such:%0A * MyStack obj = new MyStack();%0A * obj.push(x);%0A * int param_2 = obj.pop();%0A * int param_3 = obj.top();%0A * boolean param_4 = obj.empty();%0A */%0A

Create : 225 Implement Stack using Queues