MCPcopy Index your code
hub / github.com/arnauddri/algorithms / Pop

Method Pop

data-structures/stack/stack.go:33–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33func (s *Stack) Pop() (el interface{}) {
34 s.lock.Lock()
35 defer s.lock.Unlock()
36
37 el, s.stack = s.stack[0], s.stack[1:]
38 s.len--
39 return
40}
41
42func (s *Stack) Push(el interface{}) {
43 s.lock.Lock()

Callers 5

TestNewFunction · 0.80
TestTopologicalSortFunction · 0.80
SccFunction · 0.80
UndirectedDfsFunction · 0.80
DirectedDfsFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestNewFunction · 0.64
TestTopologicalSortFunction · 0.64