Skip to content
Implementation of the set data structure
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.gitignore
.golangci.yml
LICENSE.md
README.md
go.mod
set.go
set_test.go

README.md

Set

CircleCI branch License GitHub tag (latest SemVer)

Set is a threadsafe abstract data structure library for representing collection of distinct values, without any particular order.

Examples

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))
}
You can’t perform that action at this time.