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

Method Peek

flatten_nested_list_iterator_341/solution.go:80–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78}
79
80func (s *Stack) Peek() *ListIndex {
81 if len(s.items) <= 0 {
82 return nil
83 }
84
85 return s.items[len(s.items)-1]
86}
87
88func (s *Stack) IsEmpty() bool {
89 return len(s.items) == 0

Callers 2

NextMethod · 0.80
HasNextMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected