MCPcopy 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
35func (s *Stack) Push(val interface{}) {
36 s.top = &Node{val, s.top}
37 s.size++
38}
39
40func (s *Stack) Peek() interface{} {
41 return s.top.value

Callers 2

isPalindromeUsingStackFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected