Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/arnauddri/algorithms
/ New
Function
New
data-structures/stack/stack.go:11–17 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
9
}
10
11
func
New() *Stack {
12
s := &Stack{}
13
s.stack = make([]
interface
{}, 0)
14
s.len = 0
15
16
return
s
17
}
18
19
func
(s *Stack) Len() int {
20
s.lock.Lock()
Callers
1
TestNew
Function · 0.70
Calls
no outgoing calls
Tested by
1
TestNew
Function · 0.56