** Removes the element from in front of queue and returns that element. */
()
| 30 | |
| 31 | /** Removes the element from in front of queue and returns that element. */ |
| 32 | func (this *MyQueue) Pop() int { |
| 33 | ret := this.stack[0] |
| 34 | this.stack = this.stack[1:] |
| 35 | return ret |
| 36 | } |
| 37 | |
| 38 | /** Get the front element. */ |
| 39 | func (this *MyQueue) Peek() int { |