Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
44
func
(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
53
func
main() {
54
stack := New()
Callers
2
isPalindromeUsingStack
Function · 0.45
main
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected