MCPcopy Create free account
hub / github.com/careercup/ctci / Pop

Method Pop

go/chapter02/stack/stack.go:44–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44func (s *Stack) Pop() (val interface{}) {
45 if s.size > 0 {
46 val, s.top = s.top.value, s.top.next
47 s.size--
48 return
49 }
50 return ""
51}
52
53func main() {
54 stack := New()

Callers 2

isPalindromeUsingStackFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected