aureooms/js-permutation

View on GitHub
src/permutation.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * Allocates a new permutation of given input size.
 *
 * @param {number} n The size of the permutation to allocate.
 * @returns {Array} The allocated permutation.
 */
export function permutation(n) {
    return new Array(n);
}