Tree
- Tree:
e46f123db9629d565e192c701f34812dcc652f3f- Date:
- Message:
- add PermutationsAllSizes
| .gitignore | commits | blame |
| LICENSE | commits | blame |
| README.md | commits | blame |
| go.mod | commits | blame |
| go.sum | commits | blame |
| permutation.go | commits | blame |
| permutation_test.go | commits | blame |
README.md
# permutation
A simple permutation package using generics. Requires go1.18 or higher
## Install
```bash
go get github.com/fputs/permutation@latest
```
## Usage
```go
package main
import (
"fmt"
perm "github.com/fputs/permutation"
)
func main() {
a := []int{1, 2, 3}
p := perm.Permutations(a)
fmt.Println(p)
}
```
result:
```
[1 2 3]
[2 1 3]
[3 1 2]
[1 3 2]
[2 3 1]
[3 2 1]
```
