Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trivigy/set
Implementation of the set data structure
https://github.com/trivigy/set
algorithm data-structure go set
Last synced: 23 days 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 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-22T23:26:48.000Z (over 4 years ago)
- Last Synced: 2024-06-20T01:58:16.182Z (5 months 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
[![CircleCI branch](https://img.shields.io/circleci/project/github/trivigy/set/master.svg?label=master&logo=circleci)](https://circleci.com/gh/trivigy/workflows/set)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.md)
[![](https://godoc.org/github.com/trivigy/set?status.svg&style=flat)](https://pkg.go.dev/github.com/trivigy/set)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/trivigy/set.svg?style=flat&color=e36397&label=release)](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 mainimport (
"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))
}
```