https://github.com/jimouchen/ds-set
🚀 A set data structure implemented with go.
https://github.com/jimouchen/ds-set
Last synced: 2 months ago
JSON representation
🚀 A set data structure implemented with go.
- Host: GitHub
- URL: https://github.com/jimouchen/ds-set
- Owner: JimouChen
- License: mit
- Created: 2022-12-17T09:37:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-17T13:30:47.000Z (over 2 years ago)
- Last Synced: 2025-01-27T08:15:35.090Z (4 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ds-set
🚀 A set data structure implemented with go.# 🔥 Usage && Quick Start
- setup:
`import "github.com/JimouChen/ds-set/easyset"`
- `go mod tidy` in terminal or use `go get` to download package
- just code# 🌰 Example
```go
package mainimport (
"fmt"
"github.com/JimouChen/ds-set/easyset"
)func main() {
s := easyset.Set{}
s.InitSet()
s.Add("2")
s.Add(1)
s.Add(456)
s.Show()
_ = s.Delete(1)
s.Show()
fmt.Println(s.Length())
fmt.Println(s.Contain("22"))
s.Clear()
fmt.Println(s.Length())
s.Show()
}
```
- res```shell
2 1 456
2 456
2
false
0Process finished with the exit code 0
```