classMyQueue{Deque<Integer> inStack;Deque<Integer> outStack;publicMyQueue(){inStack =newArrayDeque<Integer>();outStack =newArrayDeque<Integer>();}publicvoidpush(int x){inStack.push(x);}publicintpop(){if(outStack.isEmpty()){in2out();}return outStack.pop();}publicintpeek(){if(outStack.isEmpty()){in2out();}return outStack.peek();}publicbooleanempty(){return inStack.isEmpty()&& outStack.isEmpty();}privatevoidin2out(){while(!inStack.isEmpty()){outStack.push(inStack.pop());}}}/*** Your MyQueue object will be instantiated and called as such:* MyQueue obj = new MyQueue();* obj.push(x);* int param_2 = obj.pop();* int param_3 = obj.peek();* boolean param_4 = obj.empty();*/
第 3 章 Fourier级数的收敛性(Convergence of Fourier Series)
The sine and cosine series, by which one can represent
an arbitrary function in a given interval, enjoy
among other remarkable properties that of being convergent.
This property did not escape…