push expensive
| 22 | } |
| 23 | //push expensive |
| 24 | void push(int x){ |
| 25 | q2.push(x); |
| 26 | N++; |
| 27 | |
| 28 | while(!q1.empty()){ |
| 29 | q2.push(q1.front()); |
| 30 | q1.pop(); |
| 31 | } |
| 32 | |
| 33 | queue<int> temp = q1; |
| 34 | q1 = q2; |
| 35 | q2 = temp; |
| 36 | } |
| 37 | |
| 38 | //pop easy |
| 39 | void pop(){ |
no test coverage detected