permutations-count:计算可能的排列数量

时间:2021-05-16 17:07:13
【文件属性】:
文件名称:permutations-count:计算可能的排列数量
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-16 17:07:13
JavaScript 排列数 给定集合的大小和有序子集的大小(排列),计算可能的排列数目。 安装 $ npm install --save permutations-count 用法 var permutationsCount = require ( 'permutations-count' ) ; var numPermutations = permutationsCount ( 12 , 3 ) ; console . log ( numPermutations ) ; // => 1320 console . log ( permutationsCount ( 1000 , 30 ) ) ; // ... this will take a few seconds // => 6.444605211972133e+89 permutationsCount(n,r) 返回number 需要n >= r
【文件预览】:
permutations-count-master
----index.js(345B)
----test.js(406B)
----package.json(786B)
----LICENSE(1KB)
----.gitignore(27B)
----README.md(1KB)
----.jshintrc(170B)

网友评论