Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/TheAlgorithms/Go
/ ExampleSet
Function
ExampleSet
structure/set/setexample_test.go:7–20 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
5
)
6
7
func
ExampleSet() {
8
9
set := New(1, 2, 3)
10
fmt.Println(set.Len())
// 3
11
set.Add(3)
12
fmt.Println(set.Len())
// 3
13
set.Add(4)
14
fmt.Println(set.Len())
// 4
15
16
// output:
17
// 3
18
// 3
19
// 4
20
}
Callers
nothing calls this directly
Calls
3
New
Function · 0.70
Len
Method · 0.65
Add
Method · 0.65
Tested by
no test coverage detected