MCPcopy Create free account
hub / github.com/VanjaRo/LeetCode / Pop

Method Pop

tasks/232.go:32–36  ·  view source on GitHub ↗

** Removes the element from in front of queue and returns that element. */

()

Source from the content-addressed store, hash-verified

30
31/** Removes the element from in front of queue and returns that element. */
32func (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. */
39func (this *MyQueue) Peek() int {

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected