MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / set

Struct set

structure/set/set.go:53–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53type set[T comparable] struct {
54 elements map[T]bool
55}
56
57func (st *set[T]) Add(value T) {
58 st.elements[value] = true

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected