Merge fd04d7e6538fb8466e2b9fcf3c55284af535457a into 73272eaf6186b7001cab62c8714b2a1cd8e6e9aa
This commit is contained in:
commit
130dfd8aac
@ -411,6 +411,9 @@ Stack<Integer> in = new Stack<Integer>();
|
||||
Stack<Integer> out = new Stack<Integer>();
|
||||
|
||||
public void push(int node) {
|
||||
if (in.isEmpty())
|
||||
while (!out.isEmpty())
|
||||
in.push(out.pop());
|
||||
in.push(node);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user