Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
80
func
(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
88
func
(s *Stack) IsEmpty() bool {
89
return
len(s.items) == 0
Callers
2
Next
Method · 0.80
HasNext
Method · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected