Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/betty200744/ultimate-go
/ IsEmpty
Method
IsEmpty
algorithms/data-structures/stack/stack.go:29–31 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
27
return
s
28
}
29
func
(s *Stack) IsEmpty() bool {
30
return
len(s.stack) == 0
31
}
32
func
(s *Stack) Peek() (
interface
{}, bool) {
33
if
len(s.stack) == 0 {
34
return
nil, false
Callers
2
Max
Method · 0.95
Test_Stacks
Function · 0.45
Calls
no outgoing calls
Tested by
1
Test_Stacks
Function · 0.36