Skip to content

likegun/math-permutation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

math-permutation(数学排列)

Install

npm i math-permutation --save

Usage

var permutation = require('math-permutation')
var arr = [1, 2, 3]

//Get all conditions that conbine two element of the the arr(different order different condition)
permutation.amn(arr, 2)

//Get all conditions that conbine two element of the the arr(different order different condition and element can repeat)
permutation.amnWithRepetition(arr, 2)

Note

Only support for array of String or Number


See test for more details

About

数组排列

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published