MCPcopy 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
7func 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

NewFunction · 0.70
LenMethod · 0.65
AddMethod · 0.65

Tested by

no test coverage detected