https://github.com/trivigy/set
Implementation of the set data structure
https://github.com/trivigy/set
algorithm data-structure go set
Last synced: 8 months ago
JSON representation
Implementation of the set data structure
- Host: GitHub
- URL: https://github.com/trivigy/set
- Owner: trivigy
- License: mit
- Created: 2019-03-23T06:00:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-22T23:26:48.000Z (over 5 years ago)
- Last Synced: 2024-06-20T01:58:16.182Z (over 1 year ago)
- Topics: algorithm, data-structure, go, set
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Set
[](https://circleci.com/gh/trivigy/workflows/set)
[](LICENSE.md)
[](https://pkg.go.dev/github.com/trivigy/set)
[](https://github.com/trivigy/set/releases/latest)
Set is a threadsafe abstract data structure library for representing collection
of distinct values, without any particular order.
### Examples
```go
package main
import (
"fmt"
"github.com/trivigy/set"
)
func main() {
m := set.New("b", "b", "c", "d")
fmt.Println(m.Contains("b", "c", "d"))
m1 := set.New("b", "b", "c", "d")
m2 := set.New("c", "b", "d", "b")
fmt.Println(m1.Equals(m2))
}
```