Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/careercup/ctci
/ Push
Method
Push
go/chapter02/stack/stack.go:35–38 ·
view source on GitHub ↗
(val interface{})
Source
from the content-addressed store, hash-verified
33
}
34
35
func
(s *Stack) Push(val
interface
{}) {
36
s.top = &Node{val, s.top}
37
s.size++
38
}
39
40
func
(s *Stack) Peek()
interface
{} {
41
return
s.top.value
Callers
2
isPalindromeUsingStack
Function · 0.45
main
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected