MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / Pop

Method Pop

flatten_nested_list_iterator_341/solution.go:70–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70func (s *Stack) Pop() *ListIndex {
71 if len(s.items) <= 0 {
72 return nil
73 }
74
75 val := s.items[len(s.items)-1]
76 s.items = s.items[:len(s.items)-1]
77 return val
78}
79
80func (s *Stack) Peek() *ListIndex {
81 if len(s.items) <= 0 {

Callers 1

NextMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected